What is an Alias in SQL?-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

What is an Alias in SQL?

1780169608831412 2021-10-16 15:01:34 28

What is an Alias in SQL?

SQL
云服务器登录 云服务器设置
分享到
取消 提交回答
全部回答(1)
  • 无敌小将
    2021-10-16 16:19:44
    已采纳

    An alias is a feature of SQL that is supported by most, if not all, RDBMSs. It is a temporary name assigned to the table or table column for the purpose of a particular SQL query. In addition, aliasing can be employed as an obfuscation technique to secure the real names of database fields. A table alias is also called a correlation name.

    An alias is represented explicitly by the AS keyword but in some cases, the same can be performed without it as well. Nevertheless, using the AS keyword is always a good practice.

    SELECT A.emp_name AS "Employee"  /* Alias using AS keyword */
    B.emp_name AS "Supervisor"
    FROM employee A, employee B   /* Alias without AS keyword */
    WHERE A.emp_sup = B.emp_id;
    
    1 0
数据库
使用钉钉扫一扫加入圈子
+ 订阅

分享数据库前沿,解构实战干货,推动数据库技术变革

相似问题
最新问题