摘要: (1) 数据记录筛选: sql="select * from 数据表 where 字段名=字段值 order by 字段名 " sql="select * from 数据表 where 字段名 like ‘%字段值%‘ order by 字段名 " sql="select top 10 * from 数据表 where 字段名 order by 字段名 " sql="select * from 数据表 where 字段名 in (‘值1‘,‘值2‘,‘值3‘)" sql="select * from 数据 阅读全文
posted @ 2014-04-07 21:35 小布丁丶 阅读(137) 评论(0) 推荐(0) 编辑
摘要: SQL 约束 (Constraints)约束说明如下: create table Persons ( id int primary key identity(1,1) , ---主键,自增长 id_p int not null unique CHECK (Id_P>0) --check , --唯一 LastName varchar(255) not null , --null FirstName varchar(255), City varchar(255) default 'beijing', --default Constraint uc_FullName uniq 阅读全文
posted @ 2014-04-07 21:34 小布丁丶 阅读(156) 评论(0) 推荐(0) 编辑