You have an ORDERS table with the following structure: Name Null?

You have an ORDERS table with the following structure: Name Null? Type
————————- ——– ————————-
OID NUMBER(6)
ODATE DATE
CCODE NUMBER(6)
OAMT NUMBER(10,2)
The table has data in the ODATE column for all rows. Many orders are placed in a single day. You
need to ensure that the ODATE column must contain data for every order in future. Which method
would serve the purpose?

You have an ORDERS table with the following structure: Name Null? Type
————————- ——– ————————-
OID NUMBER(6)
ODATE DATE
CCODE NUMBER(6)
OAMT NUMBER(10,2)
The table has data in the ODATE column for all rows. Many orders are placed in a single day. You
need to ensure that the ODATE column must contain data for every order in future. Which method
would serve the purpose?

A.
Modify the column using the ALTER TABLE…MODIFY command.

B.
Add a UNIQUE constraint to the column using the ALTER TABLE…ADD CONSTRAINT command.

C.
Add a NOT NULL constraint to the column using the ALTER TABLE…ADD CONSTRAINT command.

D.
Add a PRIMARY KEY constraint to the column using the ALTER TABLE…ADD CONSTRAINT
command.



Leave a Reply 3

Your email address will not be published. Required fields are marked *


jean

jean

MODIFY COLUMN IN TABLE

To MODIFY A COLUMN in an existing table, the Oracle ALTER TABLE syntax is:

ALTER TABLE table_name
MODIFY column_name column_type;
Example

Let’s look at an example that shows how to modify a column in an Oracle table using the ALTER TABLE statement.

For example:

ALTER TABLE customers
MODIFY customer_name varchar2(100) not null;
This Oracle ALTER TABLE example will modify the column called customer_name to be a data type of varchar2(100) and force the column to not allow null values.

Luz

Luz

ALTER TABLE table_name
MODIFY column_name datatype

hoan nguyen

hoan nguyen

C.Add a NOT NULL constraint