现在的位置: 首页 > 综合 > 正文

sql case when

2012年02月04日 ⁄ 综合 ⁄ 共 298字 ⁄ 字号 评论关闭

Select distinct case when BranchCourseId  is null then Tb_Client.ThreePhaseKind else BranchCourseId end BranchCourseId
, Tb_Client.* from Tb_Client
inner join Tb_Class_Client on Tb_Client.id = Tb_Class_Client.clientId
inner join Tb_Class on tb_class_client.classid = tb_class.id
inner join tb_course on tb_class.courseid = tb_course.id

抱歉!评论已关闭.