标签:ret rom begin select exist ati info arc class
DECLARE @dbname nvarchar(128)
SET @dbname = N‘database_name‘
IF NOT EXISTS (SELECT name FROM master.dbo.sysdatabases
WHERE (‘[‘ + name + ‘]‘ = @dbname OR name = @dbname))
BEGIN
CREATE DATABASE TuoTuo;
END
GO
IF (EXISTS (SELECT *
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = ‘TheSchema‘
AND TABLE_NAME = ‘TheTable‘))
BEGIN
--Do Stuff
END
标签:ret rom begin select exist ati info arc class
原文地址:http://www.cnblogs.com/swlin/p/6523363.html