I'm using TSQL(SQL Server).
I started using Table variables for lightweight operations.
These are easy to use but I found populating these are a bit inconvenient or I'm missing something.
let's say I want to insert all rows from a table with 25 columns into a table variable.
The only I could make it work was to Define a Table variable with all 25 columns defined in it and then do the insert.
Is there a way that this can be done automatically? That is we don't define the columns inside temp table and they get generated dynamically onthe insert?