theghost
theghost

Reputation: 19

line being ignored when trying to run a script in oracle sql

I am a student who is new to Oracle SQL and I am having some trouble when trying to run my script. One step in my assignment is to display the table structure using a describe command. Whenever I run the script I use either DESC or DESCRIBE and both give the error message "You have requested to run a script containing statement(s) SQL Workshop will ignore. Please confirm your request." as well as displaying "Line Number Unknown Statement 7 ". Would anyone be able to help me find what the problem is? The rest of the script runs with no problem. Code:

***

> Blockquote

DESC LOCATION;
SELECT* FROM LOCATION;
UPDATE LOCATION SET ZIP_CODE='10601' WHERE LOCATION_ID='L01';
UPDATE LOCATION SET ZIP_CODE='32099' WHERE LOCATION_ID='L09';
UPDATE LOCATION SET ZIP_CODE='02138' WHERE LOCATION_ID='L12';
UPDATE LOCATION SET ZIP_CODE='08818' WHERE LOCATION_ID='L04';
UPDATE LOCATION SET ZIP_CODE='07097' WHERE LOCATION_ID='L07';
SELECT* FROM LOCATION;
SELECT* FROM LOCATION ORDER BY ZIP_CODE;
SELECT* FROM LOCATION ORDER BY STATE, LOCATION;***

Upvotes: 0

Views: 188

Answers (1)

pifor
pifor

Reputation: 7882

DESC statement is not an Oracle SQL statement: it is actually a command implemented by Oracle client tools such as SQL*Plus, sqlcl or SQL Developer. If you are SQL Workshop in APEX you need to use something else: in APEX you should use the Describe button as documented in https://docs.oracle.com/cd/E59726_01/doc.50/e39150/sql_proc.htm#AEUTL222.

Upvotes: 1

Related Questions