在SQL Server2005中用语句创建数据库和表:
具体示例如下:
use master
go
if exists (select * from sysdatabases where name='Study')
--判断Study数据库是否存在,如果是就进行删除
drop database Study
go
EXEC sp_configure 'show advanced options', 1
GO
-- 更新当前高级选项的配置信息
RECONFIGURE
GO
EXEC sp_configure 'xp_cmdshell', 1
GO
-- 更新当前功能(xp_cmdshell)的配置信息。
RECONFIGURE
GO
exec xp_cmdshell 'mkdir D:data',...[ 查看全文 ]