2
votes

I tried creating a table structure on Greenplum, with the following query:

create table dbname.check
(
    empid integer,
    empname character varying,
    salary bigint
)
distributed by empid

And the error I got is: "cannot explain create table without an AS clause".

As far as I know the table structure create table queries are not supposed to have an AS clause. And even if I give an AS clause, it says that there is some error near the empid part.

1
Please post your error trace with question - Anil Maurya
I have posted the error trace, and yes :) I am using postgresql. Green Plum. - user3569188

1 Answers

1
votes

You need to wrap the distributed column in ( )

So you should run:

create table dbname.check
(
    empid integer,
    empname character varying,
    salary bigint
)
distributed by (empid);