AW: [PHP] MSSQL help w/ auto_increment
| From: | Red Wingate | Date: | Tue, 23 Apr 2002 18:03:47 +0000 |
| Subject: | AW: [PHP] MSSQL help w/ auto_increment | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-94218@lists.php.net to get a copy of this message | ||
Try : news_id int(11) auto_increment
-----Ursprüngliche Nachricht-----
Von: Miguel Cruz [mailto:mnc@stoic.net]
Gesendet: Dienstag, 23. April 2002 5:16 PM
An: david@atom.is
Cc: php-general@lists.php.net
Betreff: Re: [PHP] MSSQL help w/ auto_increment
Unfortunately there is a lot of variation from one RDBMS' SQL
implementation to another.
Try something like this:
create table test (
news_id int identity,
title varchar(50), blah blah...
miguel
> ----- 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
> ------------------------
>
>
>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php