SELECTING IDENTITY VALUES


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: SELECTING IDENTITY VALUES

  1. #1
    SHERYL KEMP Guest

    SELECTING IDENTITY VALUES


    How can I select the identity values from 2 seperate tables?
    what is the syntax please

  2. #2
    David Satz Guest

    Re: SELECTING IDENTITY VALUES

    there is really no such thing:

    declare @id1 int, @id2 int

    insert table1 ( ..) values (...)
    set @id1 = scope_identity() -- @@identity prior to SQL Server 2000

    insert table2 ( ..) values (...)
    set @id2 = scope_identity() -- @@identity prior to SQL Server 2000
    --
    HTH,
    David Satz
    Principal Web Engineer
    Hyperion Solutions
    { SQL Server 2000 SP2/6.5 SP5a } { Cold Fusion 5 SP1 } { VSS }
    (Please reply to group only - emails answered rarely)
    -----------------------------------------------------------------
    "SHERYL KEMP" <DIANEDINERO@AOL.COM> wrote in message
    news:3c98e7f6$1@10.1.10.29...
    >
    > How can I select the identity values from 2 seperate tables?
    > what is the syntax please




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center