What is SQL false name? Here, we will figure out how we can characterize false names of table, segment in SQL? What is the reasons for assumed names and what is the benefits of SQL?
- False names implies elective name.
- We can characterize SQL false names utilizing ‘as’ proviso.
- SQL nom de plumes can be utilized to give a transitory name.
- Reason for SQL assumed names is to improve meaningfulness.
- We can actualize SQL assumed names for table or section.
Syntax for table:
SELECT column_name FROM table_name as alias_name;
Syntax for column:
SELECT column_name as alias_name FROM table_name;
Example: Alias for column name:
Full_name Anny Sharma Ayesha Sharma Preeti jain Rahul jain
mysql> SELECT full_name as name FROM emp;
Name Anny Sharma Ayesha Sharma Preeti jain Rahul jain
Example: Alias for table name
Id Full_name 3 Anny sharma 4 Ayesha jain 5 Preeti jain 6 Rahul jain
mysql> SELECT * FROM emp as e where e.id = 4;
Id Full_name 4 Ayesha jain