Search Postgresql Archives

Re: What's wrong with this SQL?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On May 10, 2006, at 12:06 AM, Adam wrote:

CREATE TABLE "users" ("user_ID" SERIAL(12), "first_name" character varying(40) NOT NULL, "last_name" character varying(40) NOT NULL, "password" character varying(16) NOT NULL, "email" character varying (100) NOT NULL, "privilege" integer(2) NOT NULL, PRIMARY KEY ("user_ID"))

PostgreSQL integers don't have a size property. So SERIAL(12) and integer(2) are wrong. See the type choices here:

http://www.postgresql.org/docs/8.1/interactive/datatype.html#DATATYPE- INT



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux