IT Solutions
Search This Blog
Thursday, November 12, 2009
How to use identity column in a SQL select statement
Using following statement we can select identity column in a SQL select statement.
SELECT
Userid,ServiceLineID,
IDENTITY
(
int
,1,1)
AS
i2
INTO
#t
FROM
users
ORDER BY
ServiceLineID
SELECT
*
FROM
#t
DROP TABLE
#t
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment