Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2005
    Posts
    1

    Unanswered: how to insert identity values

    hi to the group,
    i am small problem,
    i am having two columns 1 is col1 which is a primary key and col2 any think .now i want to insert the data into second column at that time the first column must get the values in identity (like 1,2,3,4 etc)
    with out using identity(sql server)/generated always(db2)
    can any one knows please explain it

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Didn't I answer this one already?

    http://weblogs.sqlteam.com/brettk/ar...6/29/1687.aspx
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by Brett Kaiser
    OMFG brett, are you kidding?

    you seriously expect people to remember everything you wrote up to several years ago on a completely different site from this one?

    i don't know, man, did you answer it already?

    sheesh
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    jagadish, look up the SET IDENTITY INSERT option in Books Online.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •