declare @id int

declare @name char(10) ;注意:char(10)為10位,要是位數小了會讓數據出錯

set @id=1

select @id=1

select @id=(select  1)