摘要: Amber集团公司刚刚收购了一些新公司。每个公司都遵循这样的层次结构: 数据保存在如下的表中: Company:company_code为公司的代码,founder为公司的创始人 Lead_Manager:lead_manager_code为牵头经理的代码,company_code为其所在公司代码 阅读全文
posted @ 2017-10-13 14:20 bloveice0915 阅读(333) 评论(0) 推荐(0) 编辑
摘要: 数据表Occupation保存了每一个人的名字及职业,描述如下: Column Type Name string Occupation string 查询以输出每个名字按字母顺序排列在其相应的职业下面。职业及列标题分别是Doctor,Professor,Singer和Actor。 当没有与职业对应的 阅读全文
posted @ 2017-10-13 10:06 bloveice0915 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 在MySQL中,if可以作为表达式使用,其语法为: IF(expr1,expr2,expr3) 如果 expr1 是TRUE (expr1 <> 0 and expr1 <> NULL),则 IF()的返回值为expr2; 否则返回值则为 expr3。IF() 的返回值为数字值或字符串值,具体情况视 阅读全文
posted @ 2017-10-13 10:03 bloveice0915 阅读(827) 评论(0) 推荐(0) 编辑