Skip to content
Advertisement

Create a table for following condition

condition for the problem to be solved:

This is the following condition to create the table

The code i tried to do is

I couldn’t solve the first condition and so i am getting right parenthesis missing for final condition

Advertisement

Answer

I would translate your requirement as follows:

Changes to your original code:

  • you want NUMERIC rather than NUMBER

  • ArCode must be declared as PRIMARY KEY, and needs a check constraint to enfore the “Must begin with A” requirement

  • the check constraint on Quantity should allow 0 value (that’s the default!)

  • Class needs a check constraint on the list of allowed values

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