MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
With SQL, how can you insert a new record into the “Persons” table?
A
INSERT INTO Persons VALUES (’Ahmed’);
B
INSERT VALUES (’Ahmed’) INTO Persons;
C
INSERT (’Ahmed’) INTO Persons;
D
INSERT VALUES INTO (’AHMED’);
Explanation: 

Detailed explanation-1: -The INSERT INTO statement is used to insert new records in a table.

Detailed explanation-2: -The INSERT INTO statement adds a new record to a table. INSERT INTO can contain values for some or all of its columns. INSERT INTO can be combined with a SELECT to insert a record.

Detailed explanation-3: -If you would like to create a new table based on the structure and data from another table, you can use the SELECT INTO clause. First, write a SELECT clause followed by a list of columns (in our example: id, name, and price ) from the existing table (in our example: product ).

There is 1 question to complete.