How i can do the following querry to get needed information
        Posted  
        
            by 
                Night Walker 
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Night Walker 
        
        
        
        Published on 2011-01-12T07:47:59Z
        Indexed on 
            2011/01/12
            7:54 UTC
        
        
        Read the original article
        Hit count: 249
        
Hello there
I have two tables
CompList table with following columns : CompId , McID , station , slot ,subslot , and several others
BookingTable with columns: CompId , LineID , McID , station , slot ,subslot.
I want to get following result:
rows only that CompList.CompId == BookingTable.CompId (only CompId that is in both tables) 
and i need in the result columns from CompList: CompId , McID , station , slot ,subslot .
and from BookingTable:  LineID , McID , station , slot ,subslot
and how i will be able to distinguish between same columns with same table in the result table them in the result table?
Thanks for help.
© Stack Overflow or respective owner