- SQL Server
declare
@v_code varchar(4);
select @v_code=CountryRegionCode from Person.CountryRegion where @@ROWCOUNT=1;
select * from Person.CountryRegion where CountryRegionCode=@v_code
declare
@v_code varchar(4);
select @v_code=CountryRegionCode from Person.CountryRegion where @@ROWCOUNT=1;
select * from Person.CountryRegion where CountryRegionCode=@v_code
本文标题:SQL变量的定义及使用
本文链接:https://www.haomeiwen.com/subject/aazlmttx.html
网友评论