查询数据 简单的查询 create table stu_info ( sno int not null ,sname ) not null ,sex ) not null ,birth ) not null ,email ) not null ,telephone int not null ,depart ) not null ) select distinct depart from dbo.stu_info -- select order by depart from dbo.stu_inf
linq 查询数据 /// <summary> /// 汽车品牌及车型 /// </summary> /// <returns></returns> public string GetCarBrandSeries() { var result = from a in db.CR_BC_BRAND join c in db.CR_BC_BRAND_SERIES on a.CR_BC_BRAND_ID equals c.CR_BC_BRAND_ID select
用户对表或视图最常进行的操作就是检索数据,检索数据可以通过 select 语句来实现,该语句由多个子句组成,通过这些子句完成筛选.投影和连接等各种数据操作,最终得到想要的结果. 语法: select { [ distinct | all ] columns | * } [ into table_name ] from { tables | views | other select } [ where conditions] [ group by columns ] [ having cond
增加数据: insert into "表名" values( '字段'',字段'); 或insert into '表名'( '字段'',字段') values( '字段'',字段'); 修改数据: update "表名" set gender='男' where id=1 删除数据: delete from "表名" where id=1 带条件删除 delete from 删除,但可以找回 truncate table 彻底删除 查询数据: