标签:-- ++ rom declare bsp sql class code use
USE pubs Go WHILE (SELECT AVG(price) FROM titles) < $30 BEGIN UPDATE titles SET price = price * 2 SELECT MAX(price) FROM titles IF (SELECT MAX(price) FROM titles) > $50 BREAK ELSE CONTINUE END ------------------------------------------------------ 设置个变量,就能实现for(i=0;i<10,i++) DECLARE @i int set @i=0 WHILE @i<10 BEGIN //语句序列 ... set @i=@i+1 END 使用go go select * from AYS_XZ_MEETINGROOM go 200
标签:-- ++ rom declare bsp sql class code use
原文地址:http://www.cnblogs.com/KSalomo/p/6531713.html