GeekInterview.com
Series: Subject:
Question: 59 of 234

Alias in Joins

Why do we use aliases during joining two tables?
Asked by: manishayadav_1 | Member Since Apr-2008 | Asked on: Apr 24th, 2008

View all questions by manishayadav_1   View all answers by manishayadav_1

Showing Answers 1 - 2 of 2 Answers

just to have more readability

  
Login to rate this answer.

Alias name it temporary name given to a tablen or  columns of a table.
It has its existence until the satement is executed. 

For example in the following example instead of typing tablenames emp and dept every time you may simply use  its alias names.

SELECT a.empno, a.ename, a.sal  , a.job, b.deptno, b.dname
FROM  emp a , dept b
WHERE a.deptno = b.deptno

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.