Quiz
SQL
Erstelle ein kostenloses Konto, um dieses Quiz zu beenden
Speichere deinen Fortschritt und sieh dir dein Endergebnis an.
oder mit deiner E-Mail registrieren
Schon ein Konto? Anmelden
Fragen in diesem Quiz (117)
1Which symbol do you use if you need to choose all the columns from the table to the result query?
- A*
- B+
- CAll
- D%
2Which is right order of the following clauses?
- ASELECT … FROM … GROUP BY … ORDER BY … WHERE
- BSELECT … WHERE … ORDER BY … GROUP BY
- CSELECT … FROM … WHERE … GROUP BY … ORDER BY
- DSELECT … FROM … WHERE … ORDER BY … GROUP BY
3Which symbol is used to create a substitution variable?
- A*
- B&
- C_
- D%
4Which keyword is used to provide an alias to a column?
- ACOLUMN
- BALIAS
- CIS
- DAS
5Which command is used to view the structure of the table LOCATIONS?
- ADESCRIBE LOCATIONS
- BSELECT * FROM LOCATIONS
- CSHOW STRUCTURE LOCATIONS
- DPRINT LOCATIONS
6Which of the following is a concatenation operator?
- A*
- B+
- C&
- D||
7Which keyword is used to eliminate duplicate rows in the result?
- ADESCRIBE
- BGROUP BY
- CHAVING
- DDISTINCT
8Which of the following operations is an analogue to the CONCAT function?
- A||
- B+
- CLIKE
- DIN
9When using LIKE conditions which symbol is used to denote zero or many characters?
- A*
- B+
- C_
- D%
10When using LIKE conditions which symbol is used to denote one character?
- A*
- B+
- C_
- D%
11Which of the following clauses is used to limit the rows that are retrieved by the query?
- AWHERE
- BFROM
- CORDER BY
- DGROUP BY
12Which of the following clauses is used to sort the rows that are retrieved by the query?
- AWHERE
- BFROM
- CORDER BY
- DGROUP BY
13Which of the following functions extracts a string of determined length?
- ASUBSTR
- BINSTR
- CCONCAT
- DTRIM
14Which of the following functions finds the numeric position of a named character?
- ASUBSTR
- BINSTR
- CCONCAT
- DTRIM
15Which of the following functions joins two strings together?
- ACONCAT
- BTRIM
- CSUBSTR
- DINSTR
16Which of the following functions is not single-row function?
- ASUM
- BUPPER
- CCONCAT
- DROUND
17Which of the following functions is not multiple-row function?
- ATRUNC
- BSUM
- CAVG
- DCOUNT
18FULL OUTER JOIN is used when
- Aeach row of one table must be join with each row of another table
- Beach row of one table must be join with each row of another table even if the tables do not have any columns in common
- Cthe rows from both tables must be displayed even if they do not satisfy the JOIN condition
- Da Cartesian product of the two tables must be displayed
19Queries that return only one row from the inner SELECT statement are called
- ASingle-column subqueries
- BMultiple-column subqueries
- CMultiple-row subqueries
- DSingle-row subqueries
20Queries that return more than one row from the inner SELECT statement are called
- AMultiple-row subqueries
- BSingle-row subqueries
- CMultiple-column subqueries
- DSingle-column subqueries
21The _______operator compares a value to each value returned by a subquery.
- AANY
- BALL
- CNOT
- DSOME
22The ________operator compares a value to every value returned by a subquery.
- AALL
- BANY
- CNOT
- DSOME
23Subqueries have the following characteristics:
I. Can pass one row of data to a main statement that contains a single-row operator, such as =, <>, >, >=, <, or <=
II. Can pass multiple rows of data to a main statement that contains a multiple-row operator, such as IN
III. Are processed first by the Oracle server, after which the WHERE or HAVING clause uses the results- AI and III
- BI, II, and III
- CI and II
- DI only
24A SELECT statement that is embedded in a clause of another SELECT statement is called
- Asubquery
- Binner query
- Couter query
- Dmain query
25You can place the subquery in a number of SQL clauses, including the following:
I. WHERE clause
II. HAVING clause
III. FROM clause- AI and III
- BI, II and III
- CI and II
- DI only
26Comparison conditions fall into two classes:
- Asingle-row operators (>, =, >=, <, <>, <=) and multiple-column operators (IN, ANY, ALL)
- Bsingle-column operators (>, =, >=, <, <>, <=) and multiple-column operators (IN, ANY, ALL)
- Cmultiple-row operators (>, =, >=, <, <>, <=) and single-row operators (IN, ANY, ALL)
- Dsingle-row operators (>, =, >=, <, <>, <=) and multiple-row operators (IN, ANY, ALL)
27The subquery generally executes_________, and its output is used to complete the query condition for the main (or_________) query.
- Alast, outer
- Bfirst, inner
- Clast, inner
- Dfirst, outer
28A subquery must be enclosed in_________________.
- Acurly braces
- Bdouble quotes
- Csingle quotes
- Dparentheses
29_________ clause can be used and is required in the subquery to perform Top-N analysis.
- AORDER BY
- BHAVING
- CWHERE
- DGROUP BY
30Which of the following operators is equivalent to the IN operator?
- A< ANY
- B= ALL
- C= ANY
- D> ANY
31Queries containing set operators are called______________.
- Aouter queries
- Bcompound queries
- Csubqueries
- Dinner queries
32The _____________operator returns all rows that are selected by either query eliminating duplicates.
- AINTERSECT
- BUNION
- CMINUS
- DUNION ALL
33Use the ________________operator to return all rows from multiple tables and eliminate any duplicate rows.
- AUNION ALL
- BUNION
- CMINUS
- DINTERSECT
34_______________ returns all rows selected by either query, including all duplicates.
- ANTERSECT
- BMINUS
- CUNION
- DUNION ALL
35Use the __________________operator to return all rows that are common to multiple queries.
- AUNION
- BUNION ALL
- CMINUS
- DINTERSECT
36Use the ______________operator to return rows returned by the first query that are not present in the second query.
- AMINUS
- BINTERSECT
- CUNION
- DUNION ALL
37Which statement discards all pending data changes
- ADISCARD
- BSAVEPOINT
- CROLLBACK
- DCOMMIT
38Which of the following commands removes rows and a table structure?
- AREMOVE TABLE
- BALTER TABLE
- CDROP TABLE
- DDELETE TABLE
39Which of the following commands is a part of the Data Manipulation Language?
- ATRUNCATE
- BDROP
- CALTER
- DSELECT
40Which of the following commands is a part of the Data Definition Language?
- ADELETE
- BUPDATE
- CSELECT
- DCREATE
41Which of the following constraints does not exist?
- AUNIQUE
- BCHECK
- CNOT NULL
- DDEFAULT
42Consider the EMPLOYEES table. Which of the following SQL statements is correct to display the last name of the employee with its hire date providing the Employee and Hire Date aliases (case is important)?
- ASELECT last_name AS 'Employee', hire_date AS 'Hire Date' FROM employees;
- BSELECT last_name "Employee", hire_date "Hire Date" FROM employees;
- CSELECT last_name Employee, hire_date Hire Date FROM employees;
- DSELECT last_name AS Employee, hire_date AS Hire Date FROM employees;
43Consider the EMPLOYEES table. Which of the following SQL statements is correct to provide the sentence in the format "King has been working since 01.01.1987" with "Employee Information" alias?
- ASELECT last_name || ' has been working since ' || hire_date Employee Information FROM employees;
- BSELECT last_name || ' has been working since ' || hire_date 'Employee Information' FROM employees;
- CSELECT last_name || " has been working since " || hire_date "Employee Information" FROM employees;
- DSELECT last_name || ' has been working since ' || hire_date "Employee Information" FROM employees;
44What will be the result of the following SQL statement?
SELECT DISTINCT department_id
FROM employees- AThe number of employees within each department will be displayed
- BAn error will occur since the GROUP BY clause is missing
- CThe unique department ids will be displayed
- DThe number of departments will be displayed
45Which of the following SQL statements will not generate an error?
- ASELECT department_id Dep, COUNT(last_name) Num FROM employees GROUP BY department_id HAVING Num > 5
- BSELECT department_id Dep, COUNT(last_name) FROM employees GROUP BY Dep
- CSELECT last_name Name FROM employees WHERE Name like 'K%'
- DSELECT last_name Name FROM employees ORDER BY Name
46Consider the EMPLOYEES table. Which condition in the WHERE clause limit the employees to those whose salary is greater than 5000 but less than 18000?
- AWHERE salary > 5000 AND salary > 18000
- BWHERE salary > 5000 AND salary < 18000
- CWHERE salary < 5000 AND salary > 18000
- DWHERE salary > 5000 OR salary < 18000
47Consider the EMPLOYEES table. Which condition in the WHERE clause limit the employees to IT programmers with salary greater than 5000?
- AWHERE salary > 5000 AND job_id = 'IT_PROG'
- BWHERE salary > 5000 OR job_id = 'IT_PROG'
- CWHERE salary > 5000 AND job_id = "IT_PROG"
- DWHERE salary > 5000 AND job_id = IT_PROG
48Consider the EMPLOYEES table. Which condition in the WHERE clause limit the employees to those who work in the departments 90 and 60?
- AWHERE department_id BETWEEN 60 AND 90
- BWHERE department_id BETWEEN 90 AND 60
- CWHERE department_id = 90 OR department_id = 60
- DWHERE department_id = 90 AND department_id = 60
49Consider the EMPLOYEES table. Which condition in the WHERE clause limit the employees to those who do not work in the departments 90 and 60?
- AWHERE department_id = 90 OR department_id = 60
- BWHERE department_id NOT IN (90, 60)
- CWHERE department_id = 90 AND department_id = 60
- DWHERE department_id IN (90, 60)
50Consider the EMPLOYEES table. Which condition in the WHERE clause limit the employees to those whose last name and first name starts with the letter ‘K’?
- AWHERE last_name LIKE 'K%' and first_name LIKE 'K%'
- BWHERE last_name LIKE 'K_' and first_name LIKE 'K_'
- CWHERE last_name = 'K%' and first_name = 'K%'
- DWHERE last_name and first_name = 'K%'
51Oracle's multi-versioning feature achieves read-consistent query results
- ATrue
- BFalce
52Which of the following statements is NOT true?
- ASingle-row functions can be nested to any depth
- BSingle-row functions return one result per row whereas multiple-row functions return one result per group of rows
- CArithmetic operations like addition and subtraction are possible with dates
- DCONCAT function can accept any number of parameters
53SELECT e.last_name emp, m.last_name mgr
FROM employees e JOIN employees m
ON (e.manager_id = m.employee_id)
WHERE (m.employee_id = 101)- AThe list of managers for the employee with id 101 will be displayed
- BThe last names of employees managed by the employee with id 101 will be displayed
- CAn error will occurs since WHERE clause cannot be used after JOIN clause
- DAn error will occur since it is impossible to join a table with itself
54Create a report that lists the employee IDs and job IDs of those employees who currently have a job title that is the same as their job title when they were initially hired by the company (that is they changed jobs but have now gone back to doing their original job)
- ASELECT employee_id, job_id
FROM employees
MINUS
SELECT employee_id, job_id
FROM job_history - BSELECT employee_id, job_id
FROM employees
INTERSECT
SELECT employee_id, job_id
FROM job_history - CSELECT employee_id, job_id
FROM employees
UNION
SELECT employee_id, job_id
FROM job_history - DSELECT employee_id, job_id
FROM employees
UNION ALL
SELECT employee_id, job_id
FROM job_history
- ASELECT employee_id, job_id
55SELECT e.last_name, e.salary, d.department_name mgr
FROM employees e JOIN departments d- AAn error will occurs since in the SELECT clause a column that is used to join the tables is missing
- BThe last names of the employees and their salaries will be displayed along with the departments names where the employee work
- CThe Cartesian product of the two tables will be displayed
- DAn error will occur since the join condition is missing
56SELECT e.last_name emp, m.last_name mgr
FROM employees e JOIN employees m
ON (e.manager_id = m.employee_id)
AND (m.employee_id = 101)- AThe last names of the employees managed by the employee with id 101 will be displayed
- BAn error will occur since it is impossible to join a table with itself
- CThe last name for the employee with id 101 will be displayed along with its manager
- DAn error will occur since additional condition in the WHERE clause cannot be used after JOIN clause
57Consider the EMPLOYEES table. Which of the following statements count the number of employees within each department?
- ASELECT department_id, COUNT(last_name) FROM employees GROUP BY department_id
- BSELECT department_id, COUNT(last_name) FROM employees GROUP BY last_name
- CSELECT department_id, department_name, COUNT(last_name) FROM employees GROUP BY department_id
- DSELECT department_name, COUNT(last_name) FROM employees GROUP BY department_id
58Consider the EMPLOYEES table. Which condition in the WHERE clause limit the employees to those whose salary is greater than 5000 but less than 18000?
- AWHERE salary > 5000 OR salary < 18000
- BWHERE salary > 5000 AND salary < 18000
- CWHERE salary > 5000 AND salary > 18000
- DWHERE salary < 5000 AND salary > 18000
59The data of a temporary table is visible to all sessions
- ATrue
- BFalse
60By default, the foreign key restricts deletes of any parent row that has a corresponding child row(s)
- ATrue
- BFalse
61What will be result of the following SQL statement
SELECT last_name, department_name
FROM employees, departments- AAn error will occur since these tables do not have any columns in common
- BAn error will occur since the join condition is missing
- CThe list of all the employees will be displayed with the names of the departments where they work
- DThe Cartesian product of the two tables will be displayed
62SELECT e.last_name emp, m.last_name mgr
FROM employees e JOIN employees m
WHERE (e.manager_id = m.employee_id)- AAn error will occur since none of the JOIN operations is used
- BThe last names of the employees and their salaries will be displayed along with the departments manes where the employees work
- CAn error will occur since in the SELECT clause a column that is used to join the tables is missing
- DThe Cartesian product of the two tables based on the department_id column will be displayed
63The NUMBER data type is usually the best choice for a primary key
- ATrue
- BFalse
64Consider the EMPLOYEES table. Which condition in the WHERE clause will generate an error?
- ASELECT * FROM &Table
- BSELECT * FROM employees WHERE last_name = '&Name'
- CSELECT job_id, SUM(salary) FROM employees GROUP BY '&Column'
- DSELECT &Column FROM employees
65Write SQL statement, where you must insert multiple rows with a single INSERT statement
- AINSERT INTO mytable (col1, col2, col3) values ('val1', 'val2', 'val3')
SELECT * FROM dual - BINSERT INTO mytable (column1, column2, column3) values ('val1.1', 'val1.2', 'val1.3')
SELECT * FROM dual - CINSERT INTO mytable (column1) values ('val1.1')
SELECT * FROM dual - DINSERT ALL
INTO mytable (column1, column2, column3) VALUES('val1.1', 'val1.2', 'val1.3')
INTO mytable (column1, column2, column3) VALUES('val2.1', 'val2.2', 'val2.3')
INTO mytable (column1, column2, column3) VALUES('val3.1', 'val3.2', 'val3.3')
SELECT * FROM dual
- AINSERT INTO mytable (col1, col2, col3) values ('val1', 'val2', 'val3')
66The HR department needs a list of countries that have no departments located in them. Display the country ID and the name of the countries
- ASELECT country_id, country_name
FROM countries
MINUS
SELECT country_id, country_name
FROM countries
NATURAL JOIN locations
NATURAL JOIN departments; - BSELECT country_id, country_name
FROM countries
INTERSECT
SELECT country_id, country_name
FROM countries
NATURAL JOIN locations
NATURAL JOIN departments; - CSELECT country_id, country_name
FROM countries
UNION
SELECT country_id, country_name
FROM countries
NATURAL JOIN locations
NATURAL JOIN departments;
- ASELECT country_id, country_name
67What will be the result of the following SQL statement?
SELECT e.last_name, e.hire_date
FROM employees e JOIN employees d
ON (d.last_name = 'Fay')
WHERE e.hire_date > d.hire_date- AThe last name and the hire date will be displayed for the employee Fay
- BThe last name and hire dates of the employees who were hired before employee Fay will be displayed
- CThe last name and hire dates of the employees who were hired after employee Fay will be displayed
- DAn error will occur since the JOIN condition is wrong
68The subquery generally executes _____, and its output is used to complete the query condition for the main (for___) query
- Afirst, inner
- Bfirst, outer
- Clast, outer
- Dlast, inner
69The UNION and UNION ALL set operators have the opposite effect of each other
- ATrue
- BFalse
70Which of the following statements is NOT true?
- AOnly two tables can be joined using the JOIN operations
- BAny unmatched rows are not displayed as a result of the inner join
- CThe CROSS JOIN clause produces the Cartesian product of the tables
- DThe NATURAL JOIN and USING clauses are mutually exclusive
71Consider the EMPLOYEES table. Which condition in the WHERE clause limit the employees to those who work in the department prompted by the user?
- AWHERE department_id = ‘&Department’
- BWHERE department_id = ‘%Department’
- CWHERE department_id like= ‘%Department’
- DWHERE department_id like = ‘_Department’
72SELECT SUBSTR('Hello, World!!!', 13) FROM DUAL
- AAn error will occur since SUBSTR function need to take 3 parameters
- B!!!
- CHello, World!
- DHello, World!!!13
73Consider the EMPLOYEES table. Which of the following SQL statement displays hire date in that format 'Nineteenth of January, 1998'?
- ASELECT TO_DATE(hire_date, 'fmddspth "of" MONTH, YYYY') FROM employees
- BSELECT TO_DATE(hire_date, 'fmddpsth "of" MONTH, YYYY') FROM employees
- CSELECT TO_DATE(hire_date, 'fmDdspth "of" MONTH, YYYY') FROM employees
- DSELECT TO_DATE(hire_date, 'fmDdspth "of" MONTH, YEAR') FROM employees
74Write SQL statement where you must inserted value into the table. The value is '3-may-03 21:02:44'
- AINSERT INTO table_name(data_field) VALUES(TO_DATE('3.05.2003' , 'yyyy/mm/dd hh24:mi:ss'))
- BINSERT INTO table_name(data_field) VALUES(TO_DATE('2003/05/03 21:02:44', 'yyyy/mm/dd hh24:mi:ss'))
- CINSERT_INTO_table_name(data_field) VALUES(TO_DATE('2003/03/05 21:44:02', 'yyyy/mm/dd hh24:mi:ss'))
- DINSERT table_name(data_field) VALUES(TO_DATE('2003/05/03 21:02:44', 'yyyy/mm/dd hh12:mi:ss'))
75What will be the result of the following SQL statement
SELECT count(d.department_name), l.city
FROM departments d NATURAL JOIN locations l
GROUP BY l.city- AThe number of departments in each city is shown
- BAn error will occur since the GROUP BY clause cannot be used with NATURAL JOIN
- CThe number of departments in all cities is shown
- DThe number of departments in one particular city is shown
76SELECT SUBSTR(CONCAT('Hello', 'World', '!!!', 1, 5)) FROM DUAL
- AWorld
- Bo
- CAn error will occur since CONCAT function can take only two parameters
- DHello
77The _____________ constraint defines a condition that each row must satisfy
- AUNIQUE
- BFOREIGN KEY
- CPRIMARY KEY
- DCHECK
78Delete the student 900 from the STUDENT table. Make the change permanent
- ADELETE FROM student
HAVING student_id = 900
COMMIT - BDELETE ON student
WHERE student_id = 900
COMMIT - CDELETE FROM student
WHERE student_id = 900
COMMIT - DDELETE FROM student
WHERE student_id = 900
- ADELETE FROM student
79A session is an individual connection to the Oracle database server
- ATrue
- BFalse
80It is possible to combine data from two tables that do not have a primary key/foreign key relationship into one result using a set operation?
- ATrue
- BFalse
81Consider the EMPLOYEES table. Which of the following statements calculate the maximum salary for each job, displaying only those rows where maximum salary is less than 12000?
- ASELECT job_id, MAX(salary)
FROM employees
WHERE MAX(salary) < 12000
GROUP BY job_id - BSELECT job_id, last_name, MAX(salary)
FROM employees
GROUP BY job_id
HAVING MAX(salary) < 12000 - CSELECT job_id, MAX(salary)
FROM employees
GROUP BY job_id
WHERE MAX(salary) < 12000 - DSELECT job_id, MAX(salary)
FROM employees
GROUP BY job_id
HAVING MAX(salary) < 12000
- ASELECT job_id, MAX(salary)
82What will be the result of the following SQL statement?
SELECT ROUND(63.548, -1) FROM DUAL- A70
- B63
- C60
- D64
83Remove rows and a table structure
- AREMOVE TABLE
- BDROP TABLE
- CALTER TABLE
- DDELETE TABLE
84Consider the EMPLOYEES table. Which condition in the WHERE clause displays the employee with last name Brown?
- AWHERE LOWER(last_name) = 'brown'
- BWHERE INITCAP(last_name) = 'brown'
- CWHERE INITCAP(last_name) = lower('BROWN')
- DWHERE INITCAP(last_name) = 'BROWN'
85Consider the following SQL statement. What will be result?
SELECT e.last_name, e.salary, d.department_name
FROM employees e Natural JOIN departments d
USING (department_id)- AAn error will occur since NATURAL JOIN and USING clauses cannon be used together
- BAn error will occur since in USING clause the column department_id is specified without a table alias
- CAn error will occur since in USING clause the JOIN condition is not specified
- DThe last names of the employees and their salaries will be displayed along with the departments names where the employees work
86Write SQL statement for display the names of the employees who are working in the company for the past 5 years
- Aselect ename from emp where hiredate < add_months(sysdate, +60)
- Bselect ename from emp where hiredate < add_months(sysdate, +5)
- Cselect ename from emp where hiredate < add_months(sysdate, -60)
- Dselect ename from emp where hiredate < add_months(sysdate, -5)
87SELECT e.last_name, d.department_name
FROM employees e NATURAL JOIN departments d
ON (e.department_id = d.department_id)- AAn error will occur since in there is no column department_id in the EMPLOYEES table
- BAn error will occur since NATURAL JOIN and ON clauses cannot be used together
- CThe last names of the employees will be displayed along with the department names where the employees work
- DAn error will occur since these tables cannot be joined using NATURAL JOIN
88Constraints always have a name
- ATrue
- BFalse
89Consider the EMPLOYEES table. Which of the following statements calculate the average value for the commission_pct column taking into consideration only those employees who have a commission) ?
- ASELECT COUNT(commission_pct)
FROM employees
WHERE commission_pct IS NOT NULL - BSELECT AVG(NVL(commission_pct, 0))
FROM employees - CSELECT AVG(commission_pct)
FROM employees
HAVING commission_pct IS NOT NULL - DSELECT AVG(commission_pct)
FROM employees
- ASELECT COUNT(commission_pct)
90You cannot order the results of a set operation
- ATrue
- BFalse
91Consider the EMPLOYEES table. Which of the following SQL statements return the number of jobs that exist in the organization?
- ASELECT COUNT(DISTINCT job_id)
FROM employees - BSELECT COUNT(job_id)
FROM employees
GROUP BY department_id - CSELECT COUNT(*)
FROM employees
GROUP BY jod_id - DSELECT COUNT(job_id)
FROM employees
- ASELECT COUNT(DISTINCT job_id)
92What will be the result of the following SQL statement? (SYSDATE is a date of your exam)
SELECT TO_DATE(SYSDATE, 'DD.MM.YY') FROM DUAL- A31.05.2013
- B31.May.2013
- C31.05.13
- DAn error will occur
93SELECT e.last_name, e.salary, d.department_name
FROM employees e JOIN departments d- AThe Cartesian product of the two tables will be displayed
- BThe last names of the employees and their salaries will be displayed along with the departments names where the employees work
- CAn error will occur since the join condition is missing
- DAn error will occur since the SELECT clause a column that is used to join the tables is missing
94Transaction control determines when data manipulation becomes permanent in a database.
- ATrue
- BFakse
95What will be the result of the following SQL statement?
SELECT TRUNC(68.548, -1) FROM DUAL- A69
- B68
- C60
- D70
96.Consider the EMPLOYEES table. Which of the following statements calculated the minimum salary within each department, displaying only those rows where minimum salary is greater than 5000?
- ASELECT deparment_id, MIN(salary)
FROM employees
GROUP BY department_id
HAVING MIN(salary) > 5000 - BSELECT deparment_id, MIN(salary)
FROM employees
WHERE MIN(salary) > 5000
GROUP BY department_id - CSELECT deparment_id, department_name, MIN(salary)
FROM employees
GROUP BY department_id
HAVING MIN(salary) > 5000 - DSELECT deparment_id, MIN(salary)
FROM employees
GROUP BY department_id
WHERE MIN(salary) > 5000
- ASELECT deparment_id, MIN(salary)
97A table can be created with or without data
- ATrue
- BFalse
98Which of the following statements is NOT true?
- ASQL statement can be only on one line
- BKeywords cannot be split across lines
- CKeywords cannot be abbreviated
- DSQL statements are not case sensitive
99DISTINCT must always be used in the top-most SELECT statement of a set operation
- ATrue
- BFalse
100Consider the following SQL statements. What will be output?
SELECT last_name|| ‘were hired on’||hire_date FROM employees;
SELECT CONCAT(last_name,’were hired on’, hire_date) FROM employees- AThe second statement will generate an error since the CONCAT function can take only two parameters
- BThe output of both statements will be the same
- CThe second statement will generate an error since a column name cannot be used as a parameter to the CONCAT function
- DBoth statements will generate an error since alliases are not provided for the compound columns
101Constraints must be explicitly enabled before they can be used by the database
- ATrue
- BFalse
102Delete the zip codes 02199 and 43011 from the ZIPCODE table. Make the change the permanent
- ADELETE FROM zipcode
WHERE zip IN('02199', '43011')
COMMIT - BDELETE FROM zipcode
WHERE zip ANY('02199', '43011') - CDELETE FROM zipcode
WHERE zip ANY('02199', '43011')
COMMIT - DDELETE FROM zipcode
WHERE zip ALL('02199', '43011')
COMMIT
- ADELETE FROM zipcode
103Which of the following statements is NOT true?
- ACharacter string and date values are need to be enclosed in double quotation marks
- BTable name can be provided by the substitution variable
- CIf any column values in an arithmetic expression is null, the result is null
- DThe default sorting mode is ascending
104You need to calculate the number of days from 1st January 2007 till today. Which SQL statement would give the required output? Dates are stored in the default format dd-month-year
- ASELECT TO_DATE(SYSDATE - '01-January-2007') FROM DUAL
- BSELECT TO_CHAR(SYSDATE, 'DD-MON-YYYY') - '01-January-2007' FROM DUAL
- CSELECT SYSDATE -TO_DATE('01-January-2007', 'DD-MONTH-YYYY') FROM DUAL
- DSELECT SYSDATE - '01-January-2007' FROM DUAL
105A parent table referenced by a child table may not be dropped
- ATrue
- BFalse
106Consider the EMPLOYEES table. Which of the following statements displays the maximum average salary for each department?
- ASELECT MAX(AVG(salary))
FROM employees
GROUP BY department_id - BSELECT MAX(AVG(salary))
FROM employees - CSELECT AVG(MAX(salary))
FROM employees
GROUP BY department_id - DSELECT department_id, MAX(AVG(salary))
FROM employees
GROUP BY department_id
- ASELECT MAX(AVG(salary))
107Write SQL statement for display the department numbers with more than three employees in each dept
- Aselect deptno, count(deptno) from deptno group by emp having count(*)>3
- Bselect deptno, count(deptno) from emp group by deptno having count(*)>3
- Cselect deptno, count(emp) from deptno group by emp having count(*)>2
- Dselect deptno, count(deptno) from emp group by deptno having count(*)>2
108Write SQL statement for increasing salary of all managers by 10%
- Aupdate emp set sal=sal*1.1 where empno in (select mgr from emp)
- Bupdate emp set sal=sal*0.1 where empno in (select emp from emp)
- Cupdate emp set sal=sal*0.1 where empno in (select mgr from emp)
- Dupdate emp set sal=sal*1.1 where empno in (select emp from emp)
109If there are chemas named USERA and USERB, and both have an EMPLOYEES table, then if USERA wants to access EMPLOYEES table that belongs to USERA must write select statement as follows
- ASELECT * FROM employees
- BSELECT * FROM employees.userb
- CSELECT * FROM userb.employees
- DSELECT * FROM usera.employees
110It is possible to combine data from two tables that do not have a primary key/foreign key relationship into one result using a set operation.?
- ATrue
- BFalse
111There are no restrictions with using the Oracle outer join operator (+).?
- ATrue
- BFalse
112The ANSI join syntax is more flexible than the Oracle outer join syntax.
- ATrue
- BFalse
113Self joins are only used for tables with recursive relationships.
- ATrue
- BFalse
114Oracle supports a full outer join using two outer join operators (+).
- AFalse
- BTrue
115All joins must be based on the equality of values between the joining tables?
- ATrue
- BFalse
116You can rename a table with the RENAME or the ALTER TABLE command.
- ATrue
- BFalse
117A parent table referenced by a child table may not be dropped.
- ATrue
- BFalse
Informationen
- Beschreibung
- test
- Autor
- Hanzo Conard
- Sprache
- English
- Aufrufe
- 494
- Bewertung
- Noch keine Bewertungen Bewerte dieses Quiz