Re: MSSQL help w/ auto_increment
| From: | Geoff Hankerson | Date: | Tue, 23 Apr 2002 15:08:59 +0000 |
| Subject: | Re: MSSQL help w/ auto_increment | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-94177@lists.php.net to get a copy of this message | ||
I believe the auto increment field has to be set as the primary key as well.
----- Original Message -----
From: "David Orn Johannsson" <david@atom.is>
To: <php-general@lists.php.net>
Sent: Tuesday, April 23, 2002 10:04 AM
Subject: [PHP] MSSQL help w/ auto_increment
I'm having a problem wiht creating a db in MSSQL, I've only used Mysql
be for so I tryed the syntax just the same way.
I'm trying to execute this code:
create table test
(
news_id int not null auto_increment
, title varchar(50) not null
, ndate varchar(50) not null
, headline varchar(150) not null
, fullarticle text not null
, lang varchar(50) not null
, PRIMARY KEY(news_id))
But it gives me an error on the auto_increment, which I assume is wrong
for MSSQL, I've been searching the web for any results regarding to this
problem of mine without any luck so I hope you can find it in your heart
to help me if you can :)
Thaks for your time
<http://www.atom.is/> ------------------------
Davíð Örn Jóhannssson
Vefforritari
------------------------
Atómstöðin hf.
Garðastræti 37
101 Reykjavík
------------------------
sími: 595-3643
fax: 595-3649
<mailto:david@atom.is> david@atom.is
<http://www.atom.is/> http://www.atom.is
------------------------