SunQuest
 
      SQL Basics
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Tutorialized ForumsDatabasesSQL Basics

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old November 24th, 2004, 01:02 AM
prashant_bcs prashant_bcs is offline
Junior Member
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 2 prashant_bcs New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old December 1st, 2004, 11:20 PM
ayanwen312 ayanwen312 is offline
Junior Member
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Location: Davao City
Posts: 1 ayanwen312 New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #3  
Old December 20th, 2004, 01:40 PM
rc69 rc69 is offline
Junior Member
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 28 rc69 New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
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
__________________

Deceptive Logic
Mind the gap

Reply With Quote
Reply

Viewing: Tutorialized ForumsDatabasesSQL Basics > Sql / Autoincrement field ?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway