SQL语句中AS是什么意思?

SELECT column_name AS alias_nameFROM table_name

SQL语句中AS的意思是:别名

AS用处:

    query时

    用来重新指定返回的column名字。

    示例

    一个table有个column叫 id, query是select id from table1

    如果不想叫id,就可重新命名。

    如叫 systemID,可这样写:select id as systemId from table1。

    create table 或 procedure 时

    as 是个关键字。

    示例

    create table test as select * from table1

    这时会create 一个table test,完全copy table table1里的全部数据。

    create procdure name as (is)

    begin

    end;
    这时as和is可以互换。

温馨提示:答案为网友推荐,仅供参考
相似回答