随笔分类 -  SQL

sql 循环语句几种方式(变量循环,游标循环,事务)
摘要:--第一 1 declare @orderNum varchar(255) 2 create table #ttableName(id int identity(1,1),Orders varchar(255)) 3 declare @n int,@rows int 4 5 6 insert #tt 阅读全文

posted @ 2018-12-13 22:21 绅士狼 阅读(586) 评论(0) 推荐(0)

SQL中循环和条件语句
摘要:1 --1、if语句使用示例: 2 declare @a int 3 set @a=12 4 if @a>100 5 begin 6 print @a 7 end 8 else 9 begin 10 print 'no' 11 ... 阅读全文

posted @ 2018-12-13 22:18 绅士狼 阅读(707) 评论(0) 推荐(0)

导航