SQL中declare变量的使用

 时间:2024-10-12 02:45:00

1、declare @n varchar(100)--定义变量set @n =3--赋值select * from T_Bas_User where id=@n

SQL中declare变量的使用

2、declare @n varchar(100)--定义2个变量declare @m varchar(100)select @n =3,刺胳挤萧@m=9select * from T_Bas_User where id between @n and @m--查询2个值之间的数据,比如可以删除某段时间的数据

SQL中declare变量的使用
  • 如何用python执行cmd命令
  • insert into语句怎么用
  • sql删除语句
  • 怎样使用sqlserver来查询表数据
  • mysql怎么配置环境变量?
  • 热门搜索
    游戏名字大全 牛腩的做法大全家常 如何炖排骨好吃 成都火锅哪家好吃 深圳有什么好吃的 摇钱树怎么种 去痘痘的最快方法 开头结尾摘抄大全 丰田车型大全 燕京理工学院怎么样