Skip to content
Advertisement

Can I allow only certain specific strings to be inputted for a table in Oracle 10G?

In this table, I want a constraint such that, name inputted should be only ‘trial’,’experiment’ or ‘test’.

Advertisement

Answer

You can add the CHECK constraint as follows:

If you don’t want the null values in the name then you can also use NOT NULL constraint on the name column.

While creating the table, you can use the Constraint inside it as follows:

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