Results 1 to 4 of 4

Thread: Insert Command

  1. #1
    Join Date
    Mar 2004
    Location
    Austria
    Posts
    9

    Unhappy Unanswered: Insert Command

    Hi,

    i want to get the 'primary key' from a table in which i inserted a row.
    the pk is genarated automically with an trigger and a sequence.

    Have anybody a small example in .NET (VB or #) or something else for me?

  2. #2
    Join Date
    Apr 2004
    Posts
    246
    use the returning clause
    Give a man a fish, you feed him for a day. Club him over the head with a fish, he'll leave you alone.

  3. #3
    Join Date
    Mar 2004
    Location
    Austria
    Posts
    9
    How is the syntax of a returning clause?!

  4. #4
    Join Date
    Apr 2004
    Posts
    246
    insert into t(a,b,c) values (1,2,3) returning d into my_var;
    Give a man a fish, you feed him for a day. Club him over the head with a fish, he'll leave you alone.

Posting Permissions

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