SQL Server Table Variables - TSQL Command Line - IDENTITY. Discussion of Table Variables in TSQL Command Line and how to create its own IDENTITY column. This is a very powerful programming technique, especially if you are looping through a table variable's records. However, you have to understand a few of the tricks that are involved with this type of table variable defining and populating. Table Variables are extremely useful and in some cases are a much better choice than Temporary Tables.
Tags: SQL Server Table Variables - TSQL Command Line - IDENTITY, SQL Server, scope, persistence, Local, TSQL, DECLARE @Tbl AS TABLE, DECLARING, Command Line, PRIMARY KEY, DEFAULT, UNIQUE, AUTONUMBER, IDENTITY, IDENTITY COLUMN, SQL, DROP TABLE, DROP TABLE DIRECTIVE, SQL Query, Global, Never Global, Creating, SELECT into, Creating Table Variable in SQL Server, benefits, problems, When to Use?, When to Use Table Variables?, variable, memory, command line SQL, IDENTITY field, IDENTITY column