insert into SMSData.dbo.CityInfo(CityCode, CityName, CityLevelID)
values ( '2813 ',(select T.cityname from T_city T where T.cityCode = '2813 '), '2 ')
错误提示消息:在此上下文中不允许使用子查询。只允许使用标量表达式。
请教各位!
------解决方案--------------------
insert into SMSData.dbo.CityInfo(CityCode, CityName, CityLevelID)
select '2813 ',T.cityname, '2 ' from T_city T where T.cityCode = '2813 '
看这样行不