I want to create an inner join of the following query
select listmybill.tid from listmybill
inner join
Trainerdetails
on
listmybill.tid=Trainerdetails.tid
this is working very good but i want to create the object of these table in this inner join like
select l.tid from listmybill as l.listmybill
inner join
Trainerdetails as t.Trainerdetails
on
l.tid=T.tid
but i am getting the error of incorrect syntax
Msg 102, Level 15, State 1, Line 1 Incorrect syntax near '.'.
how can i create a proc like this?
Try this:
select l.tid
from listmybill as l
inner join Trainerdetails as t on l.tid=T.tid