DQL基本查询

-- DQL基础查询 ==========
-- 查询多个字段
-- 查询Agentname和Phone两列
select Agentname,Phone from agent;

-- 列名可以用*代替,少用*号
SELECT *from agent;

-- 查询地址信息,DISTINCT去除记录
select DISTINCT AgentAddress from agent;

-- 查询数据时候,使用 as 别名称呼其中列名(as可以省略)
select  AgentID as 账号,phone as 电话 from agent;

 

posted @ 2022-11-09 23:09  YE-  阅读(15)  评论(0编辑  收藏  举报