Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jasmen
Starting Member
11 Posts |
Posted - 2014-02-25 : 07:07:08
|
i have table i want to define it as letter for example eso i can write in stored proceduree.tables columnsexamplee.empno |
|
RonnieRahman
Starting Member
6 Posts |
Posted - 2014-02-25 : 07:37:33
|
HiyaDid you mean Table alias? Table Alias sample code below:SELECT a.column1, a.column2FROM myTable aWhere a.column1=1GROUP BY a.column1, a.column2 |
|
|
jasmen
Starting Member
11 Posts |
Posted - 2014-02-25 : 07:40:26
|
i mean like this select e.empno,e.firstname,e.lastname,e.contactno,p.policyid,p.policyname,p.policyamount,p.companyname from empregister e inner join policiesonemployees p on e.empno=p.empno where e.designation=@desig RETURNe and p are tableshow can define them as e or p |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2014-02-25 : 13:08:27
|
quote: Originally posted by jasmen i mean like this select e.empno,e.firstname,e.lastname,e.contactno,p.policyid,p.policyname,p.policyamount,p.companyname from empregister e inner join policiesonemployees p on e.empno=p.empno where e.designation=@desig RETURNe and p are tableshow can define them as e or p
You already did. The "proper" way is to use the AS operator:from empregister AS e inner join policiesonemployees AS p |
|
|
|
|
|
|
|