Reg Me Please wrote:
Hi all. What'd be the syntax to create a primary key on an already build table?
Hmm - so you want to sort of alter a table and add a primary key constraint to an existing column?
ALTER TABLE my_table ADD PRIMARY CONSTRAINT (existing_column); All in the manuals: http://www.postgresql.org/docs/8.2/static/sql-altertable.html -- Richard Huxton Archonet Ltd ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster