WebFaction
Community site: login faq

I'm trying to create a table with this sql statement: create table guru.work ( id serial, name varchar(100), author varchar(100) );

The phppgadmin embeds this within a select count() subquery and gets and error, like this: ERROR: syntax error at or near "create" LINE 1: SELECT COUNT() AS total FROM (create table guru.work ( In statement: SELECT COUNT(*) AS total FROM (create table guru.work ( id serial, name varchar(100), author varchar(100) )) AS sub

Someone else has this problem and asked about it on stackexchange, here: http://stackoverflow.com/questions/27035938/cannot-create-table-in-phppgadmin

Can you help?

asked 16 Jun '15, 09:41

john
512
accept rate: 0%


The phpPgAdmin UI provides two links for running SQL - one in the main body of the page, and one in the menu bar at the top of the page.

The one in the main body of the page will throw the error you're seeing if you run a data definition statement like CREATE TABLE.

However, the one in the menu bar will run data definition queries with no problem.

In short:

Use the SQL link near the top of the page, not the one in the body of the page.

permanent link

answered 16 Jun '15, 16:06

seanf
12.2k41836
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×9
×6

question asked: 16 Jun '15, 09:41

question was seen: 3,634 times

last updated: 16 Jun '15, 16:06

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM