| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Sql / Autoincrement field ?
Hi friends i am trying to create a table in sql server 2000 with one field as autoincrement but sql is not allowing me to create a table.
can any ony help me to create a table with a field as autoincrement. here is the code which i have writen CREATE TABLE client ( clientid bigint NOT NULL AutoIncrement, company_name varchar(200) NOT NULL ) this works good with mysql
__________________
prashant |
|
#2
|
|||
|
|||
|
About the sql increment
Actually in sql 2000 server it is different with mysql. You can create a table with out coding it. And you can auto increment also. I'm not particular in the script of sql 2000 server. For you to know just explore it more nad you will know.
|
|
#3
|
|||
|
|||
|
im not exactly sure how much different sql 2000 is different from mysql 4
but in mysql 4 to do an auto-increment field, the field needs to be a key (primary, index, or unique) try that out and see if it helps |
![]() |
| Viewing: Tutorialized Forums > Databases > SQL Basics > Sql / Autoincrement field ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|