select * from tableName
先执行from子句,确定数据的来源
在执行select子句,进行数据筛选
select distinct jobs from table
去重复,只有当查询的所有列都相同时,才视为重复进行去重
select sal*12 income from table
别名,进行标注
select empno||empname from table
“||”表示连接
SQL基础操作详解
本文介绍了SQL的基本操作,包括数据来源的指定、数据筛选、去重、字段运算及标注等核心功能。通过具体示例,读者可以了解到如何使用SELECT语句进行高效的数据处理。
select * from tableName
先执行from子句,确定数据的来源
在执行select子句,进行数据筛选
select distinct jobs from table
去重复,只有当查询的所有列都相同时,才视为重复进行去重
select sal*12 income from table
别名,进行标注
select empno||empname from table
“||”表示连接
405

被折叠的 条评论
为什么被折叠?