Mirror site is read only www.netnr.com
netnr/ drop.sql 2018-09-21 14:18
SqlServer 删除所有表
-- 删除所有表
DECLARE @sql VARCHAR(8000);
WHILE EXISTS (SELECT name FROM sysobjects WHERE type = 'U')
BEGIN
    SELECT @sql = 'DROP TABLE ' + name
    FROM sysobjects
    WHERE (type = 'U');

    PRINT (@sql);

    EXEC (@sql);
END;