1.SQL 插入语句得到自动生成的递增ID 值 insert into Table1(Name,des,num) values (''ltp'',''thisisbest'',10); select @@identity as ''Id'' 2.实现是1 或0 想显示为男或女 select name,Sex=(case Sex when ''1'' then ''男'' when ''0'' then ''女'' end) from Tablename 3.嵌套子查询 select a,b,c…
一查询数值型数据: SELECT * FROM tb_name WHERE sum > 100; 查询谓词:>,=,<,<>,!=,!>,!<,=>,=< 二查询字符串 SELECT * FROM tb_stu WHERE sname = '小刘' SELECT * FROM tb_stu WHERE sname like '刘%' SELECT * FROM tb_stu WHERE sname like '%程序员' SELECT * F…