我正在尝试更新表创建语句,但遇到以下错误:Msg 102,Level 15,State 1,Line 15 ';' 附近的语法不正确。
任何指针将不胜感激。
IF EXISTS(SELECT * FROM .information_schema.tables WHERE table_name = 'DeviceDashboard')
BEGIN
DROP TABLE dbo.DeviceDashboard
END
SELECT * INTO DeviceDashboard
FROM
(
select
b.*, sm.sector
from RPT_DeviceDashboard b
left outer join sectormapping sm
on b.industry = sm.industry
);