
SQL Server T-SQL高级查询
高级查询在数据库中用得是最频繁的,也是应用最广泛的。 基本常用查询–selectselect * from student;–all 查询所有select all sex from student;–distinct 过滤重复select distinct sex from student;–count 统计select count(*) from student;select cou

SQL Server — 回忆笔记(五):T-SQL编程,系统变量,事务,游标,触发器
SQL Server — 回忆笔记(五):T-SQL编程,系统变量,事务,游标,触发器1. T-SQL编程(1)声明变量declare @age int(2)为变量赋值set @age=26(3)while循环declare @i int=1while @i=100beginprint @i@i=@i+1end(4)if elseif @i10beginprint 大于10end