Skip to content
Advertisement

How to rectify “missing right parenthesis” problem?

Following is a sample of query I am working on right now:

On compiling, it is throwing a “missing right parenthesis” error. I checked, but all the parentheses are accounted for. Can somebody help me?

Advertisement

Answer

The actual error you are seeing is caused by the date_arrived column with NOT NULL being placed before the default value of SYSDATE, when it should be after:

In addition, the second and third check constraints, while technically valid syntax, look dubious:

For the check on shelf_letter, presumably you want to enforce that it can only be the capital letters from A to Z. If so, then use REGEXP_LIKE:

For the check on call_number, use a range comparison:

Putting all this together, use the following create table statement:

Demo

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