数据库 的变量的使用

作者在 2014-05-21 14:58:15 发布以下内容

use Example
/*
*这个是多行注释
*/
go
select * from [xxxx\SQL20051].Example.dbo.客户资料---通过数据库名.架构名.对象名访问数据的方式访问数据
go
declare @songsong int---声明局部变量
set @songsong=123---给变量赋值
select @songsong=123--给变量赋值
print @songsong--打印该变量
go
declare @x int,@y int ,@z int
select @x=3,@y=4,@z=5
print @x;
print @y;
print @z;
if @x>@y
return
else
print 'my god!'

默认分类 | 阅读 1142 次
文章评论,共0条
游客请输入验证码
文章归档