On Fri, May 27, 2005 at 11:48:39AM -0400, Ying Lu wrote: > > create table tableName1 LIKE parentTable INCLUDING defaults ; > > I was trying to create table "tableName1" with the same structure as > "parentTable" without any data. I got a syntax error: > 'syntax error at or near "like" ... '
The CREATE TABLE documentation shows that LIKE should be in parentheses: CREATE TABLE tableName1 (LIKE parentTable INCLUDING DEFAULTS); http://www.postgresql.org/docs/8.0/interactive/sql-createtable.html -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster