phppgadmin - Why am I getting a syntax error on my PostgreSQL SQL? -


this question has answer here:

create table members (     memberid serial,     username varchar(255) not null,     password varchar(60) not null,     email varchar(255) not null,     active varchar(255) not null,     resettoken varchar(255) default null,     resetcomplete varchar(3) default 'no',     constraint members_pk primary key (memberid) ); 

i trying use provided statement in postgresql db, when attempt execute getting syntax error:

error:  syntax error @ or near "create" line 1: select count(*) total (create table members ( 

as far know, sql fine. not sure going wrong here.

create table members (     memberid serial constraint members_pk primary key,     username varchar(255) not null,     password varchar(60) not null,     email varchar(255) not null,     active varchar(255) not null,     resettoken varchar(255) default null,     resetcomplete varchar(3) default 'no' ); 

does moving constraint syntax help?


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -