QUESTION 8
You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database.
You have created a new table named Employees, which keeps all the information of the employees. You
want to add a new row to the Employees table. Which of the following statements will you use to
accomplish the task?
A. INSERT (column1, column2, ...columnN) INTO <table_name> VALUES(value1, value2, ...v alueN);
B. INSERT INTO <table_name>(column1, column2, ...columnN) VALUES(value1 ,value2, ...va lueN);
C. INSERT <table_name>(column1, column2, ...columnN), VALUES(value1, value2, ...valueN );
D. INSERT INTO <table_name>(column1, column2,... columnN), VALUES(value1, value2, ...v alueN);
QUESTION 10
Which of the following are true about UPDATE statements?
Each correct answer represents a complete solution. Choose all that apply.
A. You can use the WHERE clause to have your update affects a specific set of rows.
B. You use the SET clause to update multiple columns of a table separated by commas.
C. You can use co-related sub query in UPDATE statements to update data from other tables.
D. If you don't use the WHERE clause then the UPDATE will not update any rows in the table.
QUESTION 12
Which of the following statements is correct for equijoin used to join two tables named Employees and
Department?
A. SELECT Dept_Name, Emp_Name
FROM Departments d1, Employees e1
ORDER BY Dept_Name, Emp_Name;
B. SELECT D.Dept_Name, E.Emp_Name
FROM Departments d1, Employees e1
HAVING Dept_Name, Emp_Name;
C. SELECT E.Emp_Name, D.Dept_Name
FROM Departments d1, Employees e1
WHERE Dept_No = Dept_No
ORDER BY Dept_Name, Emp_Name;
D. SELECT Dept_Name, Emp_Name
FROM Departments d1, Employees e1
WHERE d1.Dept_No = e1.Dept_No
ORDER BY Dept_Name, Emp_Name;
QUESTION 14
Which of the following are the types of numeric literals that can be used in arithmetic expressions?
Each correct answer represents a complete solution. Choose all that apply.
A. Numeric
B. Integer
C. Binary
D. Real
QUESTION 19
Adam works as a Database Administrator for Pass4sure.com. The company uses MySQL as its database.
Adam has created a table named Employees in the database. He wants to retrieve the information of those
employees who have at least one person reporting to them. Which of the following queries will Adam
execute to accomplish the task?
A. SELECT employee_id, last_name, job_id, department_id FROM Employees WHERE employee_id
EXISTS (SELECT manager_id WHERE manager_id is NULL);
B. SELECT employee_id, last_name, job_id, department_id FROM Employees HAVING employee_id
IN (SELECT manager_id FROM Employees WHERE manager_id is NOT NULL);
C. SELECT employee_id, last_name, job_id, department_id FROM Employees outer WHERE EXISTS
(SELECT 'x' FROM Employees WHERE manager_id = outer.employee_id);
D. SELECT employee_id, last_name, job_id, department_id FROM Employees WHERE employee_id IN
(SELECT manager_id WHERE manager_id is NOT NULL);
QUESTION 20
You work as a Database Administrator for Pass4sure.com. The company uses the MySQL database.
You have created a new table named Employees in the database and performed update operation but you
got an error because of the last transaction. Now, you want to terminate the last transaction. Which of the
following commands can you use to accomplish the task?
Each correct answer represents a complete solution. Choose all that apply.
A. ROLLBACK
B. REMOVE
C. DELETE
D. COMMIT
QUESTION 21
You work as a Database Administrator for Pass4sure.com. The company uses MySQL as its database.
The database contains a table named Employees. You want to remove an index named Emp_name_idx
from the Employees table. Which of the following statements should you use to accomplish the task?
A. DELETE INDEX Emp_name_idx;
B. CANCEL INDEX Emp_name_idx;
C. REMOVE INDEX Emp_name_idx;
D. DROP INDEX Emp_name_idx;
QUESTION 30
Which of the following functions can be performed by a view?
Each correct answer represents a complete solution. Choose all that apply.
A. Restrict a user to specific columns in a table.
B. Contain a sub query in the FROM clause.
C. Join columns from multiple tables, so that they look like a single table.
D. Restrict a user to specific rows in a table.
QUESTION 31
Mark works as a Database Administrator for Neon Inc. He issues the following query to insert rows in a
table named Emp:
SELECT * FROM Emp
SET AUTOCOMMIT=0
INSERT INTO Emp VALUES('XXX','John',04/02/1977)
INSERT INTO Emp VALUES('YYY','Richard',03/01/1977)
ROLLBACK
How many rows will be inserted in the Emp table after the ROLLBACK statement has been issued?
A. Both rows will be inserted.
B. No rows will be inserted.
C. Only the second row will be inserted.
D. Only the first row will be inserted.
Nenhum comentário:
Postar um comentário