Search Postgresql Archives

Postgres SQL Syntax

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

 



I've a postgres statement that reads:

CREATE TABLE "channel" (
	"chanid" int NOT NULL default '0',
  	"channum" varchar(10) NOT NULL default '',
	"freqid" varchar(10) default NULL,
	"sourceid" int default NULL,
.
.
.
	PRIMARY KEY  ("chanid"),
	KEY "channel_src" ("channum","sourceid")
);

Postgres is choking on the KEY statement at the end.

> ERROR:  table "channel" does not exist
> ERROR:  syntax error at or near "(" at character 886

What's the proper postgres syntax for a double key like this?

Where can I find good examples of postgres syntax?



[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