更新时间:2023-02-07 09:09:50
根据问题中提供的信息,这些变量似乎是不必要的.您可以像这样直接执行 INSERT...SELECT
:
Based on the information provided in the question, the variables seem to be unnecessary. You can directly do INSERT...SELECT
like so:
declare @us table(name nvarchar(100),lastname nvarchar(100),UID bigint,available bit);
insert into @us
select name,lastname,UID,available
from Users
where available='1'
select * from @us