Re: SQL command Error: "create table ... Like parentTable including defaults"

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: SQL command Error: "create table ... Like parentTable including defaults"
Дата
Msg-id 20050527161722.GA31451@winnie.fuhr.org
обсуждение исходный текст
Ответ на SQL command Error: "create table ... Like parentTable including defaults"  (Ying Lu <ying_lu@cs.concordia.ca>)
Список pgsql-sql
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/


В списке pgsql-sql по дате отправления:

Предыдущее
От: Bricklen Anderson
Дата:
Сообщение: Re: SQL command Error: "create table ... Like parentTable
Следующее
От: KÖPFERL Robert
Дата:
Сообщение: Generic Join on Arrays