Hello, I would like to ask, is there a way, how to join two tables ( from first I need all columns (around 80) and second I need just two columns)? One way is to write each record (column) I need but it is realy boring 80 columns..
Whilst it is not best practice to use `select *`, you can specify which tables select a.*, b.col1, b.col2 from TableA a join TableB b on
b.id will give you all the columns from the first table, but only those you've specified from the second.
ISTR that, if you drag the table from SSMS's object explorer into a query window it writes out a list of all columns. I could, of course, be wrong. It's Sunday, and I've not got a SQL Server fired up to play with.