当前位置:网站首页>【MySQL】sql给表起别名
【MySQL】sql给表起别名
2022-07-29 01:08:00 【CAFE~BABE】
有时候,在对数据库中的表进行操作的时候,发现表名比较冗长,这时候我们就需要对表创建一个别名,别名的关键字为as(也可以不加) 。
现在有一个student表,结构如下:
现在我认为student太长了 我不想一直打。
sql语句如下
select a.Sno,a.Sname,a.Sage from student as a (as可以去掉)
结果如下:
我们就对student取了一个别名叫做a
当然一个表的时候我们就没有必要这样做,但对于多个表和表与其自身进行连接的时候就很有用了
作者:潇遥快乐
来源:CSDN
原文:https://blog.csdn.net/hxy19971101/article/details/53239979
版权声明:本文为博主原创文章,转载请附上博文链接!
边栏推荐
- 关于df[‘某一列名’][序号]
- [netding cup 2020 rosefinch group]nmap
- Tomorrow infinite plan, 2022 conceptual planning scheme for a company's yuanuniverse product launch
- [the road of Exile - Chapter 7]
- 【流放之路-第八章】
- [网鼎杯 2020 朱雀组]Nmap
- LeetCode 112:路径总和
- 基于 ICA 与 DL 的语音信号盲分离
- Event express | Apache Doris Performance Optimization Practice Series live broadcast course is open at the beginning. You are cordially invited to participate!
- [hcip] MPLS Foundation
猜你喜欢

Covering access to 2w+ traffic monitoring equipment, EMQ creates a new engine for the digitalization of all elements of traffic in Shenzhen

【公开课预告】:快手GPU/FPGA/ASIC异构平台的应用探索

MPEG音频编码三十年
![[the road of Exile - Chapter 8]](/img/df/a801da27f5064a1729be326c4167fe.png)
[the road of Exile - Chapter 8]

Stonedb invites you to participate in the open source community monthly meeting!
![[hcip] MPLS Foundation](/img/91/a2aebf333fb3e3fedf0fc393e175a9.png)
[hcip] MPLS Foundation

For a safer experience, Microsoft announced the first PC with a secure Pluto chip

Making high-precision map based on autoware (V)

Tda75610-i2c-determination of I2C address of analog power amplifier
![[the road of Exile - Chapter 5]](/img/ef/7ecc1cb4a95c613f7be91f7acc761c.png)
[the road of Exile - Chapter 5]
随机推荐
Large scale web crawling of e-commerce websites (Ultimate Guide)
Stonedb invites you to participate in the open source community monthly meeting!
【流放之路-第二章】
【流放之路-第三章】
【公开课预告】:快手GPU/FPGA/ASIC异构平台的应用探索
Covering access to 2w+ traffic monitoring equipment, EMQ creates a new engine for the digitalization of all elements of traffic in Shenzhen
动态内存与智能指针
Yocto project download and compilation
秘术冬潮烙技能搭配
What is the ISO assessment? How to do the waiting insurance scheme
MPEG音频编码三十年
Sigma-DSP-OUTPUT
[netding cup 2020 rosefinch group]nmap
Js DOM2 和 DOM3
数学建模——派出所选址
[search] - iteration deepening / bidirectional dfs/ida*
[7.21-26] code source - [square count] [dictionary order minimum] [Z-type matrix]
Explanation of yocto project directory structure
关于df[‘某一列名’][序号]
Internship: tool class writing for type judgment