Which of the above INSERT statements are valid?

You issue the following command to create the PRINT_MEDIA table.

CREATE TABLE print_media
(product_id NUMBER(3),
ad_sourcetext CLOB,
ad_photo BLOB);
Evaluate the following INSERT statements:
INSERT INTO print_media VALUES (1, empty_clob(),empty_blob());
INSERT INTO print_media VALUES (2,’This is a One Line Story’,null);
INSERT INTO print_media VALUES (3,’This is another One Line Story’,empty_blob());
INSERT INTO print_media VALUES (4,empty_clob(),to_blob(‘This is new Story’));

Which of the above INSERT statements are valid?

You issue the following command to create the PRINT_MEDIA table.

CREATE TABLE print_media
(product_id NUMBER(3),
ad_sourcetext CLOB,
ad_photo BLOB);
Evaluate the following INSERT statements:
INSERT INTO print_media VALUES (1, empty_clob(),empty_blob());
INSERT INTO print_media VALUES (2,’This is a One Line Story’,null);
INSERT INTO print_media VALUES (3,’This is another One Line Story’,empty_blob());
INSERT INTO print_media VALUES (4,empty_clob(),to_blob(‘This is new Story’));

Which of the above INSERT statements are valid?

A.
Only the first statement is valid.

B.
All the statements are valid.

C.
Only the first and fourth statements are valid.

D.
Only the first and second statements are valid.

E.
Only the first, second and third statements are valid.



Leave a Reply 4

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


Rajnish

Rajnish

As Apply…This is Obvious Correct Answer..

Leo Yu

Leo Yu

there is actually no function to_blob,but I am thinking: why Oracle doesn’t provide one to_blob? It’s not hard

dames

dames

Actually, there is.
TO_BLOB converts only LONG RAW and RAW values to BLOB values.