摘要:
左连接 格式:select from 表1 left join 表2 on 表1.列=表2.列 例1:查询所有学生的成绩,包括没有成绩的学生。 例2:查询所有学生的成绩,包括没有成绩的学生,需要显示课程名。 join前面生成的表是左表,join后面是右表 右连接 格式:select from 表1 阅读全文
摘要:
1、查询学生"百里守约"的基本信息 select from students where name='百里守约' 2、查询学生百里守约"或”百里玄策”的基本信息 select from students where name='百里守约' or name='百里玄策' 3、查询姓"张"学生的姓名,年 阅读全文
摘要:
逻辑删除 所谓的逻辑删除其实并不是真正的删除,而是在表中将对应的是否删除标识或者字段做修改操作。在逻辑上数据是被删除的,但数据本身依然存在库中 例如 update students3 set isdelete=0 update students3 set isdelete=1 where id=1 阅读全文