oracle批量刪除表數(shù)據(jù) oracle怎么刪除表?
oracle怎么刪除表?可以使用以下3種方式實(shí)現(xiàn):1、如果有plsql客戶(hù)端,則可以使用該用戶(hù)登錄,選中所有表 右鍵Drop即可。2、如果有刪除用戶(hù)的權(quán)限,則可以寫(xiě):1drop user user_n
oracle怎么刪除表?
可以使用以下3種方式實(shí)現(xiàn):
1、如果有plsql客戶(hù)端,則可以使用該用戶(hù)登錄,選中所有表 右鍵Drop即可。
2、如果有刪除用戶(hù)的權(quán)限,則可以寫(xiě):
1
drop user user_name cascade
加了cascade就可以把用戶(hù)連帶的數(shù)據(jù)全部刪掉。
3、如果沒(méi)有刪除用戶(hù)的權(quán)限,則可以執(zhí)行:
1
select "drop table "||table_name||"" from cat where table_type="TABLE"
oracle怎么清除表全部數(shù)據(jù)?
就ORACLE數(shù)據(jù)庫(kù),簡(jiǎn)單的來(lái)說(shuō)
清除數(shù)據(jù)你可能用的是delete或者truncate來(lái),而不是drop,drop是直接刪除表,delete和truncate是刪除表中的數(shù)據(jù)
比如delete:
delete from a 此法是刪除表a中的數(shù)據(jù),一條一條刪除的
truncate table a 此法也是刪除表a中的數(shù)據(jù),但是不是一條一條的刪
drop table a 此法是直接刪除表a,包括表中的數(shù)據(jù)及數(shù)據(jù)結(jié)構(gòu)
希望能幫到你
在oracle中如何刪除一個(gè)用戶(hù)下所有該用戶(hù)所建的表?
1、如果有plsql客戶(hù)端,則可以使用該用戶(hù)登錄,選中所有表右鍵Drop即可。
2、如果有刪除用戶(hù)的權(quán)限,則可以:drop user user_name cascade加了cascade就可以把用戶(hù)連帶的數(shù)據(jù)全部刪掉。--創(chuàng)建用戶(hù)createuser用戶(hù)名profiledefaultidentifiedby密碼defaulttablespace表空間名稱(chēng)temporarytablespaceTEMPaccountunlock--授權(quán)grant dba to 用戶(hù)名grant connect,resource to 用戶(hù)名
3、如果沒(méi)有刪除用戶(hù)的權(quán)限,則可以執(zhí)行:select "drop table "||table_name||"" from cat where table_type="TABLE"將得到的結(jié)果全部復(fù)制粘貼到另一個(gè)sql窗口,執(zhí)行。