0

i wrote this code in the SQL Editor of postgresql for my database

CREATE TABLE flights.LINES
(
  LID int NOT NULL,
  ORIGIN varchar(255) NOT NULL,
  DESTINATION varchar(255) NOT NULL,
  DISTANCE float NOT NULL,
  TIMETOARRIVE varchar(255) NOT NULL,
  PRIMARY KEY (LID)
);

CREATE INDEX PIndex
ON LINES (lID)

and i am trying to execute this script on clicking execute Query but i got this error!

ERROR: relation "lines" does not exist
SQL state: 42P01
Abdulmalik Zoubi
  • 23
  • 1
  • 2
  • 6
  • I rolled back your change that replaced the SQL code as text with the unreadable image. See here for details: http://meta.stackoverflow.com/questions/285551/why-may-i-not-upload-images-of-code-on-so-when-asking-a-question/285557#285557 –  Apr 07 '16 at 09:51

1 Answers1

0

You must fully qualify the table name for the index definition:

CREATE INDEX PIndex 
    ON flights.LINES (lID)