1. 首页
  2. 行业
  3. 互联网
  4. MySQL IF、 Bewteen、 AS、 Date_Format、Left join on等关键字实例

MySQL IF、 Bewteen、 AS、 Date_Format、Left join on等关键字实例

上传者: 2020-12-17 09:58:05上传 PDF文件 28.9KB 热度 24次
我们在写SQL时候,往往会需要格式化或多表联合查询,现在来一个实例看看这个问题 SELECT t.id, t.topic_title AS title, IF(sch.is_true='1','答案正确','答案错误') as answer, DATE_FORMAT(sch.create_time, '%Y-%m-%d %H:%i:%s') as createtime FROM topic t LEFT JOIN student_commit_history sch on t.id = sch.topic_id where sch.student_id =41 AND sch.create_t
下载地址
用户评论