Getting the last updated Seed value!

While i was doing work on the FYP! I encountered a problem fetching out data from the mssql DB!

Here is what the scenario of the DB Look like

<id> <name> <xml>
Where id is PK! and its Identity element (i.e. Auto increment )

As soon as i insert a tuple i require id to get generated and
then i want the newly seeded value of id in

a variable .

The simplest way of retriving it to do a query

SELECT SCOPE_IDENTITY();

and it would return the last identity value for a complete tutorial about retriving
Identity column is available here

About these ads

~ by Azeem on April 27, 2008.

One Response to “Getting the last updated Seed value!”

  1. You’re doing a good job.
    Congrats for the good job!!
    Thank you for the Services you have Done !!
    The web community appreciate!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: