drop table在不同数据库中的写法整理
1,mysql中
drop table if exists [table_name]
2,oracle中:
begin execute immediate 'drop table [table_name]'; exception when others then null; end;
3,在sql server中
if exists ( select table_name from information_schema.tables where table_name = '[table_name]') drop table [table_name]
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
如对本文有疑问, 点击进行留言回复!!
网友评论