I'm using the PostgreSQL servers in phpPgAmin and all I want to do is create one table using SQL code. This is the code I'm using in its entirety.
CREATE TABLE BIDS (
BIDID NUMERIC(3) NOT NULL,
CLIENTID NUMERIC(3) NOT NULL,
BIDDINGDATE DATE,
DESCRIPTION TEXT,
PRICE NUMERIC(4,2),
HOURLYRATE BOOLEAN,
APPROVED BOOLEAN NOT NULL,
COMMENTS TEXT
CONSTRAINT BIDS_PRIMARY_KEY PRIMARY KEY (BIDID));
This code should create the table, add some attributes and create a primary key. However, when I execute the SQL it throws this error.
I have no idea why that error occurs since there is no SELECT statement in my code. Is this a common occurrence with phpPgAdmin or PostgreSQL? If so, what should I do in order to create the table properly? Keep in mind that I need to do it using SQL code.
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: