Translate to Tamil

Earn Money


Best Offers

Amazon Best Offers

Offers

Best Online Offers

Amazon Offers

Earn Money Short URL

Friday, 10 December 2010

SQL Alias









You can give a table or a column another name by using an alias

Syntax 
SELECT column_name AS alias_name
FROM table_name AS alias_name


The "custmast" table

custcode
custname
city
qty
rate
1
Siva
Srivilliputtur
50
70
2
Bala
Sivakasi
30
56
3
Kanna
Madurai
100
200
4
Vijay
Chennai
30
30
5
Kodee
Sandnes
60
80
5
Kodee
Srivilliputtur
60
30

Example 
Select cm.custcode as Ccode,cm.custname as Cname from custmast as cm where cm.custcode=1


Output

Ccode
Cname
1
Siva

 Share This Post


No comments:
Write comments

Contact Form

Name

Email *

Message *

Infolinks

© 2014