sql的select查询语句大全(单表查询、多表连接查询)

select查询语句的用法(包括数据查询和连表查询)

环境:centos7、mysql版本如下图:
在这里插入图片描述
以下实验例子都是基于一张学生表student和一张成绩表score,以下是两张表的结构以及表数据:
1、student
在这里插入图片描述
在这里插入图片描述

2、score
在这里插入图片描述
在这里插入图片描述
一、单表查询

  • 查询所有字段;select * from 表名字;
mysql> select * from student;
+-----+-----------+----

猜你喜欢

转载自blog.csdn.net/HelloWorld_4396/article/details/127793504