一、全部的這些命令均可以經過圖形化命令進行操做。ide
1 create database test1; this
2 drop database test1; spa
二、模糊查找通配符code
1 like '[abc]%' 2 like '[^abc]%' 3 like '_'
三、插入數據和更新數據blog
1 use test 2 go 3 insert into tb_test(test1,test2) values('test','test1'); 4 update tb_test set test1='ok',test2='this' where id=1;
四、支持別名class
1 select t.test2 from tb_test t where t.test1 is not null test
五、求和模塊變量
1 declare @i int, @sum int,@csum char(10) 2 select @i=1,@sum=0--能夠給多個變量賦值 3 while @i<=100 4 begin 5 set @sum=@sum+@i--只能給單個變量賦值 6 set @i=@i+1 7 end 8 set @csum=CONVERT(char(10),@sum) 9 print '1+2+3+...+100='+@csum