新聞中心
在oracle中刪除表中數(shù)據(jù)可以使用truncate table 表名、delete from 表名 where 條件的方法,下面詳細(xì)講解一下oracle中刪除表中數(shù)據(jù)具體方法。

專業(yè)領(lǐng)域包括成都網(wǎng)站設(shè)計、成都網(wǎng)站制作、成都做商城網(wǎng)站、微信營銷、系統(tǒng)平臺開發(fā), 與其他網(wǎng)站設(shè)計及系統(tǒng)開發(fā)公司不同,成都創(chuàng)新互聯(lián)公司的整合解決方案結(jié)合了幫做網(wǎng)絡(luò)品牌建設(shè)經(jīng)驗和互聯(lián)網(wǎng)整合營銷的理念,并將策略和執(zhí)行緊密結(jié)合,為客戶提供全網(wǎng)互聯(lián)網(wǎng)整合方案。
一、delete語句
(1)有條件刪除
語法格式:
delete [from] table_name [where condition];
如:刪除users表中的userid為‘001’的數(shù)據(jù):
delete from users where userid='001';
(2)無條件刪除整個表數(shù)據(jù)
語法格式:
delete table_name;
如:刪除user表中的所有數(shù)據(jù):
delete users ;
二、Truncate語句
使用Truncate語句是刪除表中的所有記錄。
語法格式:
Truncate table table_name;
(1)刪除所有記錄不保留記錄占用空間
Truncate table table_name [drop storage];
如:刪除users表中的所有數(shù)據(jù)并不保存占用空間: Truncate table users drop storage; 由于默認(rèn)使用drop storage關(guān)鍵字,所以可以省略 drop storage;
(2)刪除所有記錄保留記錄占用空間
Truncate table table_name [reuse storage];
如:刪除users表中的所有數(shù)據(jù)并保存占用空間:
Truncate table users reuse storage;
本文名稱:oracle中刪除表中數(shù)據(jù)具體方法
標(biāo)題網(wǎng)址:http://fisionsoft.com.cn/article/ccsopjo.html


咨詢
建站咨詢
