Using SELECT INTO to create an on-the-fly IDENTITY Column

Here is a nifty way to add an IDENTITY column on the fly…

select distinct

id=IDENTITY (int, 1,1),


into dim_usr

from fact_eyeballs

Comments (3)

  1. AJAX ASP.NET AJAX Control Toolkit – Basic Sample For DynamicPopulate Control [Via: alikl ] ASP.NET …

  2. Link Listing – December 30, 2007

  3. Tony says:

    Thanks for the info, worked a charm