Week2 - Data Manipulation Language / Explore

The questions can come in any order, so make sure you are selecting right option for all questions.

INSERT INTO departments (department_id ,DEPARTMENT_NAME ,MANAGER_ID, LOCATION_ID) VALUES (100, 'Human Resources', 121, 1000);

Suppose the above given statement is modified as below:
INSERT INTO departments VALUES (100, 'Human Resources', 121, 1000);

What will be the outcome of this modification?

Assume that the DEPARTMENTS table has four columns namely, department_id ,DEPARTMENT_NAME ,MANAGER_ID and LOCATION_ID .
(a) It will insert values into all the columns of the departments table assuming that column values are provided in the same sequence as the column in the table
In any case, can update statement be used in place of insert statement?
(c) No,it is not possible at all
Which one is correct syntax for Update Statement?
(c) Update table_name Set Col_name=Value where condition;
What does DML stand for?
(c) Data Manipulation Language
Which of the following is a valid syntax for the DELETE statement in SQL?
(a) DELETE FROM table_name WHERE condition
How can you update the 'salary' column to increase all salaries by 10% in the 'employees' table?
(d) UPDATE employees SET salary = salary * 0.10;
You can drop a column with the help of DELETE
(b) FALSE
Which command allows the removal of all rows from a table but flushes a table more efficiently since no rollback information is retained:
(a) TRUNCATE command
What is true about the INSERT statement? (Choose the most appropriate answer)
(c) It can insert data in many rows of many tables at a time
What will happen if the inserted value is of a smaller length as defined for a VARCHAR2 data type column?
(a) It will throw an ORA error
Which SQL statement is used to update data in a database?
(b) UPDATE
What is true about the insertion of rows in tables?
(c) Generally the rows are inserted in a table based on certain rules known as constraints
What SQL command can be used to delete columns from a table?
(d) ALTER TABLE TableName DROP COLUMN ColumnName
Which SQL statement is used to delete data from a database?
(d) DELETE
Which of the following is a valid INSERT INTO statement in SQL?
(c) INSERT INTO Employees (Name, Age) VALUES ('John', 25)

Post a Comment