Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft SQL Server > Re: FAQ & Solut...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 10985 of 11517
Post > Topic >>

Re: FAQ & Solution: How to generate a number automatically for the

by Ivan Delic <ivce970@[EMAIL PROTECTED] > Apr 23, 2008 at 12:29 AM

On Apr 22, 5:51 am, "DanielLa...@[EMAIL PROTECTED]
" <DanielLa...@[EMAIL PROTECTED]
>
wrote:
> When inserting a record into a table, I want SQL Server to generate a
> number automatically for the Primary Key.  (e.g. OrderID is 1, 2, 3
> and so on) How to do it?
> (This behavior is similar to the "Auto-number" in Microsoft Access)
>
> http://raymondlamsk.blogspot.com/2008/03/faq-ms-sql-server-how-to-gen...

Hi Daniel.

I'll try to answer your question and hope it will work out.

All you have to do is to look under properties of your Primary Key
column. Below, just before the end of properties is property Identity.
You should change that property to be Yes instead of No, and click OK
to conform this change.

Sincerely yours,

Ivan Delic, Serbia
 




 2 Posts in Topic:
FAQ & Solution: How to generate a number automatically for the
"DanielLauJJ@[EMAIL   2008-04-22 05:51:23 
Re: FAQ & Solution: How to generate a number automatically for t
Ivan Delic <ivce970@[E  2008-04-23 00:29:15 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 1:05:07 CST 2008.