检索单个列

select studentid(列名)from tb_student(表名)
检索数据

检索多个列

select 列名,列名,列名 from 表名
select studentid,studentage from tb_student;
检索数据

检索所有列

select * from tb_student;
检索数据

检索不同的行

select distinct studentage from tb_student;
检索数据

限制结果

select studentage from tb_student limit 3;

使得返回行数不超过3行
检索数据

select studentage from tb_student limit 2,2;

第一个2 是开始位置
第二个2 是检索的行数
检索数据

使用完全限制的表名

select tb_student.studentid from tb_student;
等价于 select studentid from tb_student;
检索数据

相关文章:

  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
  • 2021-10-08
  • 2021-10-14
  • 2021-04-20
  • 2021-10-23
  • 2022-12-23
猜你喜欢
  • 2021-06-21
  • 2021-04-16
  • 2021-05-31
  • 2021-10-01
  • 2021-12-31
  • 2021-06-03
相关资源
相似解决方案