Skip to content
Advertisement

Trying to run script through Oracle 11g

I am trying to run SQL statements in the Oracle 11g Express edition, where I am to create tables. Here is my SQL code:

It only ends up processing 4 statements and I keep getting these error messages:

I am wholly unfamiliar with Oracle 11g. I am unsure if I am using the correct application in it for my assignment. I am only going by these instructions:

“For this assignment you are to write scripts to create tables and insert records. In oracle 11g I don’t want you to use the tools to generate the tables, you are required to write scripts to create the tables and records and will need to include the scripts for your submission.”

Please, what am I doing wrong?

Advertisement

Answer

Let me summarize the problems with your scripts

First you have to enclose the check constraint with braces like below

Second, there is no ON UPDATE CASCADE in Oracle 11g so you need to remove it from the CREATE TABLE statement

Third, there is no Auto increment in Oracle 11G for columns So refer this SO for a workaround

Please let me know with these corrections whether your issue is resolved

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement