Query in SQL statement
- From: "R, Rajesh (STSD)" <rajesh(dot)r2(at)hp(dot)com>
- To: <pgsql-hackers(at)postgresql(dot)org>, <pgsql-performance(at)postgresql(dot)org>
- Subject: Query in SQL statement
- Date: Thu, 29 Sep 2005 18:35:14 +0530
- Message-id: <5CBFB210D9870F40B9E5A0FBD31F3A770283AC48(at)bgeexc01(dot)asiapacific(dot)cpqcorp(dot)net>
Am trying to port a mysql statement to postgres.
Please help me in finding the error in this,
CREATE SEQUENCE ai_id;
CREATE TABLE badusers (
id int DEFAULT nextval('ai_id') NOT NULL,
UserName varchar(30),
Date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
Reason varchar(200),
Admin varchar(30) DEFAULT '-',
PRIMARY KEY (id),
KEY UserName (UserName),
KEY Date (Date)
);
Am always getting foll. Errors,
ERROR: relation "ai_id" already exists
ERROR: syntax error at or near "(" at character 240
Thanks,
Rajesh R
Home |
Main Index |
Thread Index