-
Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) Which statement produces the number of different departments that have employees with last name Smith? ()
A . SELECT COUNT (*) FROM employees WHERE last _name='smith';
B . SELECT COUNT (dept_id) FROM employees WHERE last _name='smith';
C . SELECT DISTINCT (COUNT (dept_id) FROM employees WHERE last _name='smith';
D . SELECT COUNT (DISTINCT dept_id) FROM employees WHERE last _name='smith';
E . SELECT UNIQE (dept_id) FROM employees WHERE last _name='smith'
-
Evaluate these two SQL statements: SELECT last_name, salary , hire_date FROM EMPLOYEES ORDER BY salary DESC; SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY 2 DESC; What is true about them? ()
A . The two statements produce identical results.
B . The second statement returns a syntax error.
C . There is no need to specify DESC because the results are sorted in descending order by default.
D . The two statements can be made to produce identical results by adding a column alias for the salary column in the second SQL statement.
-
Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) Which three statements insert a row into the table? ()
A . INSERT INTO employees VALUES ( NULL, 'John', 'Smith');
B . INSERT INTO employees( first_name, last_name) VALUES( 'John', 'Smith');
C . INSERT INTO employees VALUES ( '1000', 'John', NULL);
D . INSERT INTO employees (first_name, last_name, employee_id) VALUES ( 1000, 'John', 'Smith');
E . INSERT INTO employees (employee_id) VALUES (1000);
F . INSERT INTO employees (employee_id, first_name, last_name) VALUES ( 1000, 'John', ' ')
-
Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) HIRE_DATE DATE Which UPDATE statement is valid?()
A . UPDATE employees SET first_name = 'John' SET last_name ='Smith' WHERE employee_id = 180;
B . UPDATE employees SET first_name = 'John', SET last_name ='Smith' WHERE employee_id = 180;
C . UPDATE employees SET first_name = 'John' AND last_name ='Smith' WHERE employee_id = 180;
D . UPDATE employees SET first_name = 'John', last_name ='Smith' WHERE employee_id = 180
-
Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) Which statement produces the number of different departments that have employees with last name Smith?()
A . SELECT COUNT(*) FROM employees WHERE last_name='Smith';
B . SELECT COUNT(dept_id) FROM employees WHERE last_name='Smith';
C . SELECT DISTINCT(COUNT(dept_id)) FROM employees WHERE last_name='Smith';
D . SELECT COUNT(DISTINCT dept_id) FROM employees WHERE last_name='Smith';
E . SELECT UNIQUE(dept_id) FROM employees WHERE last_name='Smith'
-
Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) Which three statements inserts a row into the table? ()
A . INSERT INTO employees VALUES (NULL, 'JOHN','Smith');
B . INSERT INTO employees( first_name, last_name) VALUES ('JOHN','Smith');
C . INSERT INTO employees VALUES ('1000','JOHN','NULL');
D . INSERT INTO employees(first_name,last_name, employee_id) VALUES ('1000, 'john','Smith');
E . INSERT INTO employees (employee_id) VALUES (1000);
F . INSERT INTO employees (employee_id, first_name, last_name) VALUES ( 1000, 'john',")
-
Given the following query:SELECT last_name, first_name, age, hire_date FROM employee WHERE age > 40Which of the following clauses must be added to return the rows sorted by AGE, oldest first, and by LAST_NAME, from A to Z?()
A . SORT BY age ASC, last_name
B . SORT BY age DESC, last_name
C . ORDER BY age DESC, last_name
D . ORDER BY age ASC, last_name
-
Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2 (25) LAST_NAME VARCHAR2 (25) HIRE_DATE DATE Which UPDATE statement is valid? ()
A . UPDATE employees SET first_name = 'John' SET last_name = 'Smith' WHERE employee_id = 180;
B . UPDATE employees SET first_name = 'John', SET last_name = 'Smoth' WHERE employee_id = 180;
C . UPDATE employee SET first_name = 'John' AND last_name = 'Smith' WHERE employee_id = 180;
D . UPDATE employee SET first_name = 'John', last_name = 'Smith' WHERE employee_id = 180
-
Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) Which three statements insert a row into the table? ()
A . INSERT INTO employees VALUES (NULL, 'John', 'smith');
B . INSERT INTO employees (first_name, last_name) VALUES ('John', 'smith');
C . INSERT INTO employees VALUES ('1000, 'John', 'smith');
D . INSERT INTO employees (first_name, last_name, employee_id) VALUES (1000, 'John', 'smith');
E . INSERT INTO employees (employee_id) VALUES (1000);
F . INSERT INTO employees ( employee_id, first_name, last_name, ) VALUES (1000, 'John','')
-
Examine the description of the EMPLOYEES table:
https://assets.asklib.com/images/image2/2018080110341576486.jpg
Which statement produces the number of different departments that have employees with last name Smith?()
A . SELECT COUNT(*) FROM employees WHERE last_name='Smith';
B . SELECT COUNT(dept_id) FROM employees WHERE last_name='Smith';
C . SELECT DISTINCT(COUNT(dept_id)) FROM employees WHERE last_name='Smith';
D . SELECT COUNT(DISTINCT dept_id) FROM employees WHERE last_name='Smith';
E . SELECT UNIQUE(dept_id) FROM employees WHERE last_name='Smith'
-
Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) DEPARTMENT_ID NUMBER SALARY NUMBER What is the correct syntax for an inline view? ()
A . SELECT a.last_name, a.salary, a.department_id, b.maxsal FROM employees a, (SELECT department_id, max(salary)maxsal FROM employees GROUP BY department_id) b WHERE a.department_id = b.department_id AND a.salary < b.maxsal;
B . SELECT a.last name, a.salary, a.department_id FROM employees a WHERE a.department_id IN (SELECT department_id FROM employees b GROUP BY department_id having salary = (SELECT max(salary) from employees))
C . SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE a.salary = (SELECT max(salary) FROM employees b WHERE a.department _ id = b.department _ id);
D . SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE (a.department_id, a.salary) IN (SELECT department_id, a.salary) IN (SELECT department_id max(salary) FROM employees b GROUP BY department_id ORDER BY department _ id)
-
Examine the data in the EMPLOYEES table: LAST_NAME DEPARTMENT_ID SALARY Getz 10 3000 Davis 20 1500 Bill 20 2200 Davis 30 5000 ... Which three subqueries work? ()
A . SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department _ id);
B . SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);
C . SELECT distinct department_id FROM employees Where salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);
D . SELECT department_id FROM employees WHERE SALARY > ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);
E . SELECT last_name FROM employees Where salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);
F . SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY))
-
Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) HIRE_DATE DATE Which INSERT statement is valid? ()
A . INSERT INTO employees (employee_id, first_name, last_name, hire_date) VALUES (1000, 'John', 'smith','01/01/01);
B . INSERT INTO employees(employee_id, first_name, last_name, hire_date) VALUES (1000, 'John', 'smith','01 january 01');
C . INSERT INTO employees(employee_id, first_name, last_name, Hire_date) VALUES (1000, 'John', 'smith', To_ date ('01/01/01));
D . INSERT INTO employees(employee_id, first_name, last_name, hire_date) VALUES (1000, 'John', 'smith','01-Jan-01')
-
You own a table called EMPLOYEES with this table structure: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) HIRE_DATE DATE What happens when you execute this DELETE statement? DELETE employees; ()
A . You get an error because of a primary key violation.
B . The data and structure of the EMPLOYEES table are deleted.
C . The data in the EMPLOYEES table is deleted but not the structure.
D . You get an error because the statement is not syntactically correct.
-
1.LAST NAME:FIRST NAME:OCCUPATION:NATIONALITY:AGE:
-
The former US president Barack Hussein Obama's last name(family name) is _____.
-
How would an American student address a female teacher whose last name is Smith? A. Teacher Smith. B. Smith teacher. C. Ms. Smith. D. Reverend Smith.
-
Having obtained your name and address from the trad show last week
-
Examine the data in the EMPLOYEES table:LAST_NAME DEPARTMENT_ID SALARYGetz 10 3000Davis 20 1500Bill 20 2200Davis 30 5000...Which three subqueries work? ()
A. SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department _ id);
B. SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);
C. SELECT distinct department_id FROM employees Where salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);
D. SELECT department_id FROM employees WHERE SALARY > ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);
E. SELECT last_name FROM employees Where salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);
F. SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));
-
Joseph ______to evening classes since last month, but he still can't say "What's your name?" in Russian.
A.has been going
B.was going
C.went
D.to be has gone
-
Suppose last weekend you went to Brians home and enjoyed hospitality from his family. Write him a letter to 1) thank him, and 2) invite him to your home. You should write about 100 words. Do not use your own name. Use "Li Ming" instead. Do not write your address.
-
Examine the structure of the EMPLOYEES table:EMPLOYEE_ID NUMBER Primary KeyFIRST_NAME VARCHAR2(25)LAST_NAME VARCHAR2(25)HIRE_DATE DATEWhich UPDATE statement is valid?()
A.UPDATE employees SET first_name = ‘John‘ SET last_name =‘Smith‘ WHERE employee_id = 180;
B.UPDATE employees SET first_name = ‘John‘, SET last_name =‘Smith‘ WHERE employee_id = 180;
C.UPDATE employees SET first_name = ‘John‘ AND last_name =‘Smith‘ WHERE employee_id = 180;
D.UPDATE employees SET first_name = ‘John‘, last_name =‘Smith‘ WHERE employee_id = 180;
-
The EMPLOYEES table contains these columns:EMPLOYEE_ID NUMBER(4)LAST_NAME VARCHAR2 (25)JOB
The EMPLOYEES table contains these columns:EMPLOYEE_ID NUMBER(4)LAST_NAME VARCHAR2 (25)JOB_ID VARCHAR2(10)You want to search for strings that contain ‘SA_‘ in the JOB_ID column. Which SQL statement do you use?()
A.SELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE ‘%SA\_%‘ ESCAPE ‘\‘;
B.SELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE ‘%SA_‘;
C.SELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE ‘%SA_‘ ESCAPE "\";
D.SELECT employee_id, last_name, job_id FROM employees WHERE job_id = ‘%SA_‘;
-
Examine the structure of the EMPLOYEES and NEW_EMPLOYEES tables: EMPLOYEESEMPLOYEE_ID NUMBER Primary KeyFIRST_NAME VARCHAR2 (25)LAST_NAME VARCHAR2 (25)HIRE_DATE DATENEW EMPLOYEESEMPLOYEE_ID NUMBER Primary KeyNAME VARCHAR2 (60)Which DELETE statement is valid? ()
A. DELETE FROM employees WHERE employee_id = (SELECT employee_id FROM employees);
B. DELETE * FROM employees WHERE employee_id = (SELECT employee_id FROM new_ employees);
C. DELETE FROM employees WHERE employee_id IN (SELECT employee_id FROM new_employees WHERE name = (‘Carrey‘)‘
D. DELETE * FROM employees WHERE employee_id IN (SELECT employee_id FROM new_employees WHERE last_ name = (‘Carrey‘)‘