发布网友 发布时间:2022-04-20 21:09
共1个回答
热心网友 时间:2022-04-08 06:28
-- To allow advanced options to be changed.EXEC sp_configure 'show advanced options', 1GO-- To update the currently configured value for advanced options.RECONFIGUREGO-- To enable the feature.EXEC sp_configure 'xp_cmdshell', 1GO-- To update the currently configured value for this feature.RECONFIGUREGO这个先写了保证不会再Cmd中出错然后//这是判断是否有同名的数据库存在if exists (select * from sysdatabases where name = 'hotel')
drop database hotel
go//这是判断是否有同名的表if exists (select * from sysobjects where name = 'hotel')
drop table hotel
go