Create a table with a serial key.
CREATE TABLE publisher (
pubnum SERIAL,
pubname VARCHAR(20));
ALTER TABLE publisher ADD CONSTRAINT uc_pub UNIQUE(pubnum);
cddb=> insert into publisher (pubname) values ('EMI');
INSERT 0 1
cddb=> insert into publisher (pubname) values ('SONY');
INSERT 0 1
cddb=> select * from publisher;
pubnum | pubname
--------+---------
1 | EMI
2 | SONY
(2 rows)
cddb=>
Just somewhere to keep my notes while I'm playing.
Tuesday, May 6, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment