IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N‘Users_TEMP‘) AND type in (N‘U‘)) BEGIN DROP TABLE Users_TEMP; SELECT * INTO Users_TEMP FROM Users WHERE 1=2; END ELSE BEGIN SELECT * INTO Users_TEMP FROM Users WHERE 1=2; END;
时间: 2024-11-05 22:44:33