1 Answer

0 votes
by

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;

    Related questions

    0 votes
        ndarray is also known as the alias array. (a) True (b) False...
    asked Oct 7, 2021 in Technology by JackTerrance
    0 votes
        I have a c++11 type alias: using coord = std::array; Can I define the operator + for coord? ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
    asked Apr 29, 2022 in Education by JackTerrance
    0 votes
        I have a c++11 type alias: using coord = std::array; Can I define the operator + for coord? ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
    asked Apr 26, 2022 in Education by JackTerrance
    0 votes
        I have a c++11 type alias: using coord = std::array; Can I define the operator + for coord? ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
    asked Apr 22, 2022 in Education by JackTerrance
    0 votes
        Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
    asked Mar 17, 2022 in Education by JackTerrance
    0 votes
        ndarray is also known as the alias array. (a) True (b) False This question was posed to me in ... questions and answers pdf, Data Science interview questions for beginners...
    asked Oct 28, 2021 in Education by JackTerrance
    0 votes
        IN and NOT IN operations decreases the performance of an SQL query compared to AND/OR operations. it it True or False? a. True b. False...
    asked Feb 19, 2023 in Technology by JackTerrance
    0 votes
        I'm attempting to call my sql stored procedure which takes RaceDate as an input and returns Location as an ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
    asked May 7, 2022 in Education by JackTerrance
    0 votes
        I'm attempting to call my sql stored procedure which takes RaceDate as an input and returns Location as an ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
    asked May 4, 2022 in Education by JackTerrance
    0 votes
        I have a database in dev (SQL Server 2005 on Windows Server 2008) that I need to move to prod ( ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
    asked Mar 27, 2022 in Education by JackTerrance
    0 votes
        I'm a bit stuck on this. Basically I want to do something like the following SQL query in LINQ ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
    asked Mar 25, 2022 in Education by JackTerrance
    0 votes
        I have two insert statements, almost exactly the same, which run in two different schemas on the same ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
    asked Mar 21, 2022 in Education by JackTerrance
    0 votes
        I've got a local .mdf SQL database file that I am using for an integration testing project. Everything ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
    asked Mar 16, 2022 in Education by JackTerrance
    0 votes
        Working on a project using sqlServer 2008. EDIT for clarification : table 1 contains 1 field that has to ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
    asked Mar 4, 2022 in Education by JackTerrance
    0 votes
        If I have a view in SQL which contains various computed columns, some of which could be very expensive, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
    asked Feb 19, 2022 in Education by JackTerrance
    ...