没有合适的资源?快使用搜索试试~ 我知道了~
经典的mysql讲解和语句
资源推荐
资源详情
资源评论
select count(*) as col_0_0_ from tb_operationexaminesubjects operatione0_ where 1=1 and operatione0_.delState=1 and (operatione0_.subject like '%sa%')
and operatione0_.lincenseType=1 order by operatione0_.createDate descselect count(*) as col_0_0_ from tb_operationexaminesubjects operatione0_ where 1=1
and operatione0_.delState=1 and (operatione0_.subject like '%sa%') and operatione0_.lincenseType=1 order by operatione0_.createDate desc 条件查询
select operatione0_.id as id29_, operatione0_.lincenseType as lincense2_29_, operatione0_.operationType as operatio3_29_, operatione0_.subject as
subject29_, operatione0_.examineType as examineT5_29_, operatione0_.Examecontype as Examecon6_29_, operatione0_.Tabletype as Tabletype29_,
operatione0_.Tabletypesub as Tabletyp8_29_, operatione0_.score as score29_, operatione0_.areaId as areaId29_, operatione0_.creatorId as creatorId29_,
operatione0_.createDate as createDate29_, operatione0_.lastUpdatorId as lastUpd13_29_, operatione0_.lastUpdateDate as lastUpd14_29_, operatione0_.oid as
oid29_, operatione0_.delState as delState29_, operatione0_.orgCode as orgCode29_ from tb_operationexaminesubjects operatione0_ where 1=1 and
operatione0_.delState=1 and (operatione0_.subject like '%12%') and operatione0_.lincenseType=1 order by operatione0_.createDate desc limit 3 按照条件返回表中的某几个数据
select operationc0_.id as 编号, operationc0_.reanswer as 名称, operationc0_.Subject as 外键 from tb_operationconsult operationc0_ where
operationc0_.Subject=43357 查询,并替换列名
链表sql语句:select pe.score,tr.train_subject,tt.training_type_name from person_training as pe inner join training_info
as tr on pe.train_id = tr.train_id inner join training_type_info as tt on tr.train_type_id = tt.training_type_id where pe.person_id=73
统计级联关系:SELECT o.OrgName,o.OrgCode,(SELECT COUNT(*) FROM tb_organizetion org INNER JOIN tb_userinfo u
ON org.OID = u.orgId WHERE org.OrgCode LIKE CONCAT(o.OrgCode,'%') AND u.IsActive=1) c,
(SELECT SUM(CASE u.sex WHEN '男' THEN 1 ELSE 0 END) FROM tb_organizetion org INNER JOIN tb_userinfo u
ON org.OID = u.orgId WHERE org.OrgCode LIKE CONCAT(o.OrgCode,'%') AND u.IsActive=1) male,
(SELECT SUM(CASE u.sex WHEN '女' THEN 1 ELSE 0 END) FROM tb_organizetion org INNER JOIN tb_userinfo u
ON org.OID = u.orgId WHERE org.OrgCode LIKE CONCAT(o.OrgCode,'%') AND u.IsActive=1) female
and operatione0_.lincenseType=1 order by operatione0_.createDate descselect count(*) as col_0_0_ from tb_operationexaminesubjects operatione0_ where 1=1
and operatione0_.delState=1 and (operatione0_.subject like '%sa%') and operatione0_.lincenseType=1 order by operatione0_.createDate desc 条件查询
select operatione0_.id as id29_, operatione0_.lincenseType as lincense2_29_, operatione0_.operationType as operatio3_29_, operatione0_.subject as
subject29_, operatione0_.examineType as examineT5_29_, operatione0_.Examecontype as Examecon6_29_, operatione0_.Tabletype as Tabletype29_,
operatione0_.Tabletypesub as Tabletyp8_29_, operatione0_.score as score29_, operatione0_.areaId as areaId29_, operatione0_.creatorId as creatorId29_,
operatione0_.createDate as createDate29_, operatione0_.lastUpdatorId as lastUpd13_29_, operatione0_.lastUpdateDate as lastUpd14_29_, operatione0_.oid as
oid29_, operatione0_.delState as delState29_, operatione0_.orgCode as orgCode29_ from tb_operationexaminesubjects operatione0_ where 1=1 and
operatione0_.delState=1 and (operatione0_.subject like '%12%') and operatione0_.lincenseType=1 order by operatione0_.createDate desc limit 3 按照条件返回表中的某几个数据
select operationc0_.id as 编号, operationc0_.reanswer as 名称, operationc0_.Subject as 外键 from tb_operationconsult operationc0_ where
operationc0_.Subject=43357 查询,并替换列名
链表sql语句:select pe.score,tr.train_subject,tt.training_type_name from person_training as pe inner join training_info
as tr on pe.train_id = tr.train_id inner join training_type_info as tt on tr.train_type_id = tt.training_type_id where pe.person_id=73
统计级联关系:SELECT o.OrgName,o.OrgCode,(SELECT COUNT(*) FROM tb_organizetion org INNER JOIN tb_userinfo u
ON org.OID = u.orgId WHERE org.OrgCode LIKE CONCAT(o.OrgCode,'%') AND u.IsActive=1) c,
(SELECT SUM(CASE u.sex WHEN '男' THEN 1 ELSE 0 END) FROM tb_organizetion org INNER JOIN tb_userinfo u
ON org.OID = u.orgId WHERE org.OrgCode LIKE CONCAT(o.OrgCode,'%') AND u.IsActive=1) male,
(SELECT SUM(CASE u.sex WHEN '女' THEN 1 ELSE 0 END) FROM tb_organizetion org INNER JOIN tb_userinfo u
ON org.OID = u.orgId WHERE org.OrgCode LIKE CONCAT(o.OrgCode,'%') AND u.IsActive=1) female
资源评论
mujjjjjjjjjj
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功