62,041
社区成员
发帖
与我相关
我的任务
分享
--定义表
declare @table table (id int ,col nvarchar(20))
insert into @table select 1,N'Ida Sjöstedt'
--定义变量
declare @username nvarchar(20)
set @username=N'öö'
--更新
update @table
set col=@username
select * from @table
/*更新有效
id col
----------- --------------------
1 öö
*/
declare @table table (id int ,col nvarchar(20))
insert into @table select 1,'Ida Sjöstedt'
select * from @table
/*
id col
----------- --------------------
1 Ida Sj?stedt
*/
declare @table table (id int ,col nvarchar(20))
insert into @table select 1,N'Ida Sjöstedt'
select * from @table
/*
id col
----------- --------------------
1 Ida Sjöstedt
*/