Re: Unique
| From: | Ryan Adams | Date: | Tue, 06 Jun 2000 13:25:23 +0000 |
| Subject: | Re: Unique | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-1130@lists.php.net to get a copy of this message | ||
Create table Station
(
id varchar(30) primary key,
Station varchar(30) not null,
Details varchar(100),
unique(Station)
);
On Tue, Jun 06, 2000 at 01:14:10AM +0530, D u r r a n i wrote:
> Hi PHP's,
>
> I want to create a table as below in MySQL
>
> Create table Station
> (
> id varchar(30) Primary Key,
> Station varchar(30) unique,
> Details varchar(100)
> );
>
> But this shows the following error
>
> ERROR 1064: You have an error in your SQL syntax near 'unique,
> Details varchar(100)
> )' at line 4
>
> May I know how to create unique fields in MySQL.
>
> Thanx for ur help
> Durrani
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
---end quoted text---