Note: This Question is unanswered, help us to find answer for this one
113.
Assuming there are multiple rows in the 'Commission_Agents' table with entries for commission agents from different departments, what is the error in the following query:
SELECT name, department_id, commission_percentage from Commision_Agents
WHERE commission_percentage = (SELECT min(commission_percentage) FROM Commision_Agents GROUP BY department_id);
Answer
Correct Answer:
You cannot use '=' operator as the sub-query is returning multiple results
Note: This Question is unanswered, help us to find answer for this one
114. What keyword is used to filter values obtained by applying aggregate functions in the query results using GROUP BY clause?
Answer
Correct Answer:
HAVING;
Note: This Question is unanswered, help us to find answer for this one
115. What does MID() function do?
Answer
Correct Answer:
Extract characters from a text field.
Note: This Question is unanswered, help us to find answer for this one
116. To create a table column which should not accept blank values, which of the following can be used?
Answer
Correct Answer:
NOT NULL
Note: This Question is unanswered, help us to find answer for this one
117. Which of the following is not a DDL command?
Answer
Correct Answer:
ALERT
Note: This Question is unanswered, help us to find answer for this one
118. Which of the following is not a DDL Command?
Answer
Correct Answer:
UPDATE
Note: This Question is unanswered, help us to find answer for this one
119.
Which of the following command will work as per below statement
"We need to replace a string named "foo" with "bar" in a column having ID <= 4"
Answer
Correct Answer:
UPDATE table_name
SET column_name = REPLACE(column_name, 'foo', 'bar')
WHERE ID <= 4;
Note: This Question is unanswered, help us to find answer for this one
120.
Consider two tables A and B, having only one column each and having these values:
A = [0, 1, 2, 3, 4, 5]
B = [5, 6, 7, 8, 9, 10]
The result of the UNION ALL operator on these tables will be?
Answer
Correct Answer:
[0, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10]
Note: This Question is unanswered, help us to find answer for this one
121. To speed up searches in tables we can?
Answer
Correct Answer:
create Index
Note: This Question is unanswered, help us to find answer for this one
122. Which of the following clauses can be included in SELECT to fetch 10 records only? (Check all that apply)
Answer
Correct Answer:
LIMIT 10 TOP 10 LIMIT 10 OFFSET 1
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
123. To create a column in a table with a fixed length(n) string, which of the following data type is recommended?
Answer
Correct Answer:
CHAR
Note: This Question is unanswered, help us to find answer for this one
124.
For a table with the following columns:
product_id, product_name, supplier_id, price
Which of the following queries will give you the supplier with the maximum average price of products?
Answer
Correct Answer:
SELECT supplier_id, avg(price) FROM Products group by supplier_id having avg(price) in (Select max(avg_price) from (Select avg(price) as avg_price from products group by supplier_id))
Note: This Question is unanswered, help us to find answer for this one
125. Which of the following commands is used to explain access to data?
Answer
Correct Answer:
EXPLAIN PLAN
Note: This Question is unanswered, help us to find answer for this one
126. Which of the following operators can be used to check if a column contains NULL value?
Answer
Correct Answer:
IS NULL
Note: This Question is unanswered, help us to find answer for this one
127. Which query can be used to copy all records from table1 into table2 provided they have the same columns?
Answer
Correct Answer:
INSERT INTO table2 SELECT * FROM table1;
Note: This Question is unanswered, help us to find answer for this one
128.
What will be the output of the following query?
SELECT (ROUND(3.5 MOD 4)) from DUAL;
Answer
Correct Answer:
4
Note: This Question is unanswered, help us to find answer for this one
129.
What will be the output of the following query?
SELECT SUBSTRING('987654321', INSTR('foobar', 'o'), 5) from DUAL;
Answer
Correct Answer:
87654
Note: This Question is unanswered, help us to find answer for this one
130. Which of the following is not true about the COMMIT command?
Answer
Correct Answer:
A COMMIT will end all the transactions that were initiated before it.
Note: This Question is unanswered, help us to find answer for this one
131. What is the difference between decimal and numeric data types?
Answer
Correct Answer:
There is no difference.
Note: This Question is unanswered, help us to find answer for this one
132. Which of the following is true for creating SQL Views? (check any that apply)
Answer
Correct Answer:
If you have a complex select with lots of joins, you can implement it in a view and simply call the view without need to consider all these joins. Each user can be given permission to access the database only through a small set of views that contain the specific data the user is authorized to see, thus restricting the user's access to stored data A view can draw data from several different tables and present it as a single table, turning multi-table queries into single-table queries against the view.
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
133.
How would you create a table with one column having Integer precision of 10?
Answer
Correct Answer:
CREATE TABLE table_name
(
column_name1 INTEGER(10),
);
Note: This Question is unanswered, help us to find answer for this one
134.
Consider the following Attendance table which contains an employee attendance record for a company:
Which of these SELECT statements will list the employee ID that has logged-in most recently?
Answer
Correct Answer:
SELECT TOP 1 a.EmployeeID
FROM Attendance a
WHERE a.LoginTime = (SELECT MAX(b.LoginTime) FROM Attendance b)
Note: This Question is unanswered, help us to find answer for this one
135. Referential Integrity means that among relations
Answer
Correct Answer:
A record cannot be deleted if it has any associated data.
Note: This Question is unanswered, help us to find answer for this one
136. Which of the following only works with GROUP BY clause?
Answer
Correct Answer:
None of the above
Note: This Question is unanswered, help us to find answer for this one
137. After describing the EMPLOYEES table, you discover that the SALARY column has a data type of NUMBER(8,2). Which SALARY value(s) will not be permitted in this column?
Answer
Correct Answer:
SALARY=12345678
Note: This Question is unanswered, help us to find answer for this one
138. How can you improve the execution speed of the following query: Select * from Products Where City like '%gen%'
Answer
Correct Answer:
None of these will improve the execution speed.
Note: This Question is unanswered, help us to find answer for this one
139. All the following are properties of the Relational tables expect
Answer
Correct Answer:
Column values are of the different kind.
Note: This Question is unanswered, help us to find answer for this one
140. Complete the sentence: SELECT animals ______ types WHERE id = 5;
Answer
Correct Answer:
FROM
Note: This Question is unanswered, help us to find answer for this one
141. What is T/SQL?
Answer
Correct Answer:
It is a proprietary version of SQL developed by Microsoft for their SQL Server.
Note: This Question is unanswered, help us to find answer for this one
142. How many Oracle installations does it take to execute a query?
Answer
Correct Answer:
Four: three to hold it down, and one to rip its head off.
Note: This Question is unanswered, help us to find answer for this one
143. what listing does represent a form of SQL
Answer
Correct Answer:
minus
Note: This Question is unanswered, help us to find answer for this one
144. what keyword below can replace NOT EXIST in SQL
Answer
Correct Answer:
MINUS
Note: This Question is unanswered, help us to find answer for this one
145. Which of the following cannot be used in a subquery?
Answer
Correct Answer:
ORDER BY
Note: This Question is unanswered, help us to find answer for this one
146. How many types of indexes?
Answer
Correct Answer:
2
Note: This Question is unanswered, help us to find answer for this one
147. TRUE/FALSE. All of the SQL language, syntax, and commands are universal across all major database platforms (Oracle, MySQL, and MS-SQL).
Answer
Correct Answer:
False
Note: This Question is unanswered, help us to find answer for this one
148. How to Extract characters from a text field?
Answer
Correct Answer:
MID()
Note: This Question is unanswered, help us to find answer for this one
149. SELECT dg.* FROM dgpricing dg LEFT OUTER JOIN icitem ic ON dg.Partno = ic.Item What columns does this query return?
Answer
Correct Answer:
Columns from dg table
Note: This Question is unanswered, help us to find answer for this one
150. SELECT Customers.* FROM Customers LEFT OUTER JOIN Sales ON Customers.CustNo = Sales.CustNo What columns does this query return?
Answer
Correct Answer:
All columns from Customers table
Note: This Question is unanswered, help us to find answer for this one
151. What is function for adding all the records of a column?
Answer
Correct Answer:
SUM()
Note: This Question is unanswered, help us to find answer for this one
152. How do you select the first record of a table?
Answer
Correct Answer:
SELECT top 1 * FROM dgpricing
Note: This Question is unanswered, help us to find answer for this one
153. What's the difference between "_" and "%" in sql wildcard
Answer
Correct Answer:
% is a substitute for zero or more characters, while _ is a substitute for a single character
Note: This Question is unanswered, help us to find answer for this one
154. What is the Difference between Varchar and Char Datatypes in SQL?
Answer
Correct Answer:
VarChar is the Variable length strings with the maximum specified limit. Char are Fixed length strings
Note: This Question is unanswered, help us to find answer for this one
155. How to create indexes?
Answer
Correct Answer:
CREATE INDEX index_name ON table_name (column_name)
Note: This Question is unanswered, help us to find answer for this one
156. When an aliases is used to rename a table in a particular SQL statement. The actual table name in the database is also renamed?
Answer
Correct Answer:
False
Note: This Question is unanswered, help us to find answer for this one
157. With SQL, how do you select all the records from a table named "Companys" where the value of the column "Name" ends with an "d"?
Answer
Correct Answer:
SELECT * FROM Companys WHERE Name LIKE '%d'
Note: This Question is unanswered, help us to find answer for this one
158. Other things being equal, which queries are the fastest?
Answer
Correct Answer:
Queries including uncorrelated subqueries.
Note: This Question is unanswered, help us to find answer for this one
159. Which statement can be used to encrypt data in SQL?
Note: This Question is unanswered, help us to find answer for this one
160. When using logical (truth value) operations, how many logical results are there and what are they?
Answer
Correct Answer:
3: True, False and Unknown
Note: This Question is unanswered, help us to find answer for this one
161. what does the following sql statement do? SELECT TOP(10) WITH TIES Name, Salary FROM Employees ORDER BY Salary DESC
Answer
Correct Answer:
Get the top 10 records with the highest salary, and any record with a Salary that matches the last result
Note: This Question is unanswered, help us to find answer for this one
162. What is executed first in SQL?
Answer
Correct Answer:
FROM
Note: This Question is unanswered, help us to find answer for this one
163. What is the equivalent sql statement of following statement? Select sum(column1) a, count(column2) b from TableA where 1=2
Answer
Correct Answer:
Select 0 a, 0 b from TableA
Note: This Question is unanswered, help us to find answer for this one
164. How many TRIGGERS are allowed in MySql table
Answer
Correct Answer:
6
Note: This Question is unanswered, help us to find answer for this one
165. How can you prevent a phantom read?
Answer
Correct Answer:
By changing the isolation level to snapshot or serializable
Note: This Question is unanswered, help us to find answer for this one
166. Which statement about non-clustered index is true?
Answer
Correct Answer:
The leaf nodes of a non-clustered index contain the index rows.
Note: This Question is unanswered, help us to find answer for this one
167. Which is the highest isolation level?
Answer
Correct Answer:
Serializable
Note: This Question is unanswered, help us to find answer for this one
168. A recursive CTE would contain which of the following?
Answer
Correct Answer:
Union All
Note: This Question is unanswered, help us to find answer for this one
169. What code would find the position of the character 'D' in the string 'ABCDE' - starting at position 1?
Answer
Correct Answer:
CHARINDEX('D','ABCDE',1)
Note: This Question is unanswered, help us to find answer for this one
170. How can you insert several records in TABLE1 that already exist in TABLE2?
Answer
Correct Answer:
insert into TABLE1 (FIELD1) select FIELD2 from TABLE2
Note: This Question is unanswered, help us to find answer for this one
171. What is the difference between a unique key and primary key?
Answer
Correct Answer:
A unique key will allow NULL values
Note: This Question is unanswered, help us to find answer for this one
172. What are the differences between MySQL_fetch_array(), MySQL_fetch_object(), MySQL_fetch_row()
Answer
Correct Answer:
The mysql_fetch_object() returns the result from the database as an object only.
Note: This Question is unanswered, help us to find answer for this one
173. which of the following is NOT a SQL wildcard
Answer
Correct Answer:
~
Note: This Question is unanswered, help us to find answer for this one
174. Which of the following KEYWORDS will return the first NON-NULL value from a list of columns?
Answer
Correct Answer:
COALESCE
Note: This Question is unanswered, help us to find answer for this one
175. Which of the following types of triggers can be used with a view?
Answer
Correct Answer:
Instead of Update
Note: This Question is unanswered, help us to find answer for this one
176. What is a collation?
Answer
Correct Answer:
A set of rules that sort and compare characters.
Note: This Question is unanswered, help us to find answer for this one
177. How many clustered indexes can a table have?
Answer
Correct Answer:
1
Note: This Question is unanswered, help us to find answer for this one
178. Which of these is not a valid constraint?
Answer
Correct Answer:
EXISTS
Note: This Question is unanswered, help us to find answer for this one
179. Which is the only proven way to prevent SQL Injection
Answer
Correct Answer:
Use parameters to hold user inputs
Note: This Question is unanswered, help us to find answer for this one
180. Which of the following statements about indexes is NOT correct?
Answer
Correct Answer:
Adding additional indexes cannot decrease the performance of your database.
Note: This Question is unanswered, help us to find answer for this one
181. If you INNER JOIN tableA (which has 10 rows) with tableB (which has 5 rows), what is the smallest possible amount of rows that can be returned?
Answer
Correct Answer:
0
Note: This Question is unanswered, help us to find answer for this one
182. Which is the lowest isolation level to ensure dirty reads can not happen
Answer
Correct Answer:
Read committed
Note: This Question is unanswered, help us to find answer for this one
183. Which of the following is a valid isolation level?
Answer
Correct Answer:
Read Commited
Note: This Question is unanswered, help us to find answer for this one
184. What is a phantom read?
Answer
Correct Answer:
A phantom read occurs when, in the course of a transaction, two identical queries are executed, and the collection of rows returned by the second query is different from the first.
Note: This Question is unanswered, help us to find answer for this one
185. What is the correct syntax for using a CASE statement?
Answer
Correct Answer:
CASE {value/column} WHEN {Boolean Condition} THEN {Value} ELSE {Value} END
Note: This Question is unanswered, help us to find answer for this one
186. Where can we find subquery within another statement?
Answer
Correct Answer:
In all these clauses.
Note: This Question is unanswered, help us to find answer for this one
187. Which type of join will yield a Cartesian product?
Answer
Correct Answer:
Cross Join
Note: This Question is unanswered, help us to find answer for this one
188. Must CASE statements always be indented?
Answer
Correct Answer:
No.
Note: This Question is unanswered, help us to find answer for this one
189. What is an alternate way of writing the following statement: WHERE "column_name" IN ('value1')
Answer
Correct Answer:
WHERE "column_name" = 'value1'
Note: This Question is unanswered, help us to find answer for this one
190. What is the difference between WHERE and HAVING clauses?
Answer
Correct Answer:
HAVING filter records after the GROUP BY while WHERE filter records before the GROUP BY clause
Note: This Question is unanswered, help us to find answer for this one
191. What is a common schema name?
Answer
Correct Answer:
dbo
Note: This Question is unanswered, help us to find answer for this one
192. What keyword is used in conjunction with the INNER JOIN keywords to return rows when there is at least one match in both tables?
Answer
Correct Answer:
ON
Note: This Question is unanswered, help us to find answer for this one
193. Which of the following DROP statements is incorrect?
Answer
Correct Answer:
DROP ROW
Note: This Question is unanswered, help us to find answer for this one
194. A trigger is a database object that is attached to a table. It is most similar to what other database process?
Answer
Correct Answer:
stored procedure
Note: This Question is unanswered, help us to find answer for this one
195. What visual technique is commonly used to format subqueries?
Answer
Correct Answer:
indenting
Note: This Question is unanswered, help us to find answer for this one
196. What of the following is an operator for nonequality?
Answer
Correct Answer:
less than greater than (<>)
Note: This Question is unanswered, help us to find answer for this one
197. What function returns the highest value in a column?
Answer
Correct Answer:
MAX()
Note: This Question is unanswered, help us to find answer for this one
198. What function counts the number of rows in a column?
Answer
Correct Answer:
COUNT()
Note: This Question is unanswered, help us to find answer for this one
199. Which character is used to retrieve all columns of data?
Answer
Correct Answer:
asterisk (*)
Note: This Question is unanswered, help us to find answer for this one
200. Which of the following is NOT a basic SQL statement?
Answer
Correct Answer:
QUERY
Note: This Question is unanswered, help us to find answer for this one
201. Which character is used to end a SQL statement?
Answer
Correct Answer:
semicolon (;)
Note: This Question is unanswered, help us to find answer for this one
202. True or False: An ORDER BY clause is optional in a query.
Answer
Correct Answer:
True.
Note: This Question is unanswered, help us to find answer for this one
203. Of the following sequences which one is in the correct order?
Answer
Correct Answer:
SELECT | FROM | GROUP BY | HAVING
Note: This Question is unanswered, help us to find answer for this one
204. What statement must be placed in the blank space at the beginning of this query in order for it to be valid? ______ Movie.title, COUNT(*) AS Directors FROM Movie JOIN Movie_director ON Movie.isbn = Movie_director.isbn GROUP BY Movie.title
Answer
Correct Answer:
SELECT
Note: This Question is unanswered, help us to find answer for this one
205. True or false The ORDER BY keyword is used to sort the result-set by one or more columns.
Answer
Correct Answer:
True
Note: This Question is unanswered, help us to find answer for this one
206. What is DDL Stand for?
Answer
Correct Answer:
Data Definition Language
Note: This Question is unanswered, help us to find answer for this one
207. What keyword is used to retrieve table data?
Answer
Correct Answer:
SELECT
Note: This Question is unanswered, help us to find answer for this one
208. Which of the following is NOT included as a field in the timestamp data type?
Answer
Correct Answer:
Century
Note: This Question is unanswered, help us to find answer for this one
209. Which command is used to sort retrieved data?
Answer
Correct Answer:
ORDER BY
Note: This Question is unanswered, help us to find answer for this one
210. The command to remove rows from a table 'CUSTOMER' is:
Answer
Correct Answer:
DELETE FROM CUSTOMER WHERE ...
Note: This Question is unanswered, help us to find answer for this one
211. True or False: All SQL queries must contain a WHERE clause.
Answer
Correct Answer:
False.
Note: This Question is unanswered, help us to find answer for this one
212. What keyword is used to check for no value?
Answer
Correct Answer:
NULL
Note: This Question is unanswered, help us to find answer for this one
213. When sorting by multiple columns, which character is used to separate column names?
Answer
Correct Answer:
coma (,)
Note: This Question is unanswered, help us to find answer for this one
214. Which of the following is NOT a valid aggregate function?
Answer
Correct Answer:
Round()
Note: This Question is unanswered, help us to find answer for this one
215. Which keyword is used to retrieve only certain rows of data?
Answer
Correct Answer:
WHERE
Note: This Question is unanswered, help us to find answer for this one
216. Which keyword is used to assign an alias?
Answer
Correct Answer:
AS
Note: This Question is unanswered, help us to find answer for this one
217. What function returns the lowest value in a column?
Answer
Correct Answer:
MIN()
Note: This Question is unanswered, help us to find answer for this one
218. The FROM keyword is used to identify which piece of information?
Answer
Correct Answer:
table name
Note: This Question is unanswered, help us to find answer for this one
219. The 'JOIN' keyword is used to:
Answer
Correct Answer:
Join two tables in a query operation.
Note: This Question is unanswered, help us to find answer for this one
220. What is another name for a table row?
Answer
Correct Answer:
record
Note: This Question is unanswered, help us to find answer for this one
221. What is the definition of a foreign key?
Answer
Correct Answer:
A field in a relational table that matches the primary key column of another table.
Note: This Question is unanswered, help us to find answer for this one
222. When accessing data from a table which keyword is used immediately before the table name? (Example: SELECT column_name _______ table_name;)
Answer
Correct Answer:
FROM
Note: This Question is unanswered, help us to find answer for this one
223. What does the acronym SQL stand for?
Answer
Correct Answer:
Structured Query Language
Note: This Question is unanswered, help us to find answer for this one
224. You can add a row using SQL in a database with which of the following?
Answer
Correct Answer:
INSERT
Note: This Question is unanswered, help us to find answer for this one
225. Which aggregate function returns the total of the values in a column?
Answer
Correct Answer:
SUM()
Note: This Question is unanswered, help us to find answer for this one
226. What function is used to remove padded spaces?
Answer
Correct Answer:
TRIM()
Note: This Question is unanswered, help us to find answer for this one
227. What is the difference between DROP and DELETE.
Answer
Correct Answer:
DELETE removes a row in the table and DROP removes the entire table.
Note: This Question is unanswered, help us to find answer for this one
228. Which of the following statements can be used to undo a transaction?
Answer
Correct Answer:
ROLLBACK
Note: This Question is unanswered, help us to find answer for this one
229. What is one objective of database normalization?
Answer
Correct Answer:
reducing redundancy
Note: This Question is unanswered, help us to find answer for this one
230. =, <>, >, <, >=, <=, BETWEEN, LIKE, and IN are referred to as _____
Answer
Correct Answer:
operators
Note: This Question is unanswered, help us to find answer for this one
231. What does RDBMS mean?
Answer
Correct Answer:
Relational Database Management System
Note: This Question is unanswered, help us to find answer for this one
232. Which SQL function or feature returns a single value, calculated from values in a column?
Answer
Correct Answer:
aggregate function
Note: This Question is unanswered, help us to find answer for this one
233. What is the difference with using IN or equal(=) operator to filter records?
Answer
Correct Answer:
Equal(=) operator filters based on a single value whereas the IN operator may filter on multiple values
Note: This Question is unanswered, help us to find answer for this one
234. Which keyword is used to sort retrieved data in reverse order?
Answer
Correct Answer:
DESC
Note: This Question is unanswered, help us to find answer for this one
235. A primary key made up of more than one column is referred to as what kind of key?
Answer
Correct Answer:
composite key
Note: This Question is unanswered, help us to find answer for this one
236. Which of the following is the correct syntax to update a table?
Answer
Correct Answer:
UPDATE "table name" SET "column name" = <value> WHERE <constraint>;
Note: This Question is unanswered, help us to find answer for this one
237. If tableA is CROSS JOINED to tableB, tableA has 10 rows and tableB has 5 rows, what is the greatest possible size of the result set?
Answer
Correct Answer:
50
Note: This Question is unanswered, help us to find answer for this one
238. What is one of the purposes of normalization?
Answer
Correct Answer:
Eliminate redundancy
Note: This Question is unanswered, help us to find answer for this one
239. Which of the following is NOT a language element of SQL?
Answer
Correct Answer:
Data mining
Note: This Question is unanswered, help us to find answer for this one
240. In SQL what is the meaning of NULL?
Answer
Correct Answer:
no value
Note: This Question is unanswered, help us to find answer for this one
241. What function calculates a column's average value?
Answer
Correct Answer:
AVG()
Note: This Question is unanswered, help us to find answer for this one
242. What term is used to describe the "layout" of a database or the blueprint that outlines the way data is organized into tables?
Answer
Correct Answer:
schema
Note: This Question is unanswered, help us to find answer for this one
243. What keyword is used in conjunction with the WHERE clause when creating a subquery?
Answer
Correct Answer:
IN
Note: This Question is unanswered, help us to find answer for this one
244. What syntax would you use to write a query to select all teams that won either 2, 4, 6 or 8 games?
Answer
Correct Answer:
SELECT team_name FROM teams WHERE team_won IN (2, 4, 6, 8)
Note: This Question is unanswered, help us to find answer for this one
245. How many primary keys can a table have?
Answer
Correct Answer:
one
Note: This Question is unanswered, help us to find answer for this one
246. What is the name for a query embedded inside another query?
Answer
Correct Answer:
subquery
Note: This Question is unanswered, help us to find answer for this one
247. What is the name of a mechanism used to associate tables within a SELECT statement?
Answer
Correct Answer:
join
Note: This Question is unanswered, help us to find answer for this one
248. What keyword is used with aggregate functions to include only unique values in the calculation?
Answer
Correct Answer:
DISTINCT
Note: This Question is unanswered, help us to find answer for this one
249. An asterisk after SELECT can be used to return all ________ of a table.
Answer
Correct Answer:
columns
Note: This Question is unanswered, help us to find answer for this one
250. Which keyword is used more than once in a SQL statement that contains a subquery?
Answer
Correct Answer:
SELECT
Note: This Question is unanswered, help us to find answer for this one
251. Which of the following names is NOT a SQL based RDBMS?
Answer
Correct Answer:
MongoDB
Note: This Question is unanswered, help us to find answer for this one
252. What is the correct syntax to concatenate the contents of one column (col1) to the contents of another column (col2) in a query?
Answer
Correct Answer:
concat(col1, col2)
Note: This Question is unanswered, help us to find answer for this one
253. What keyword is used to create a table alias?
Answer
Correct Answer:
AS
Note: This Question is unanswered, help us to find answer for this one
254. The HAVING clause is used in conjunction with (and immediately after) what other clause?
Answer
Correct Answer:
GROUP BY
Note: This Question is unanswered, help us to find answer for this one
255. Which of the following are type(s) of DML Triggers?
Answer
Correct Answer:
All of these
Note: This Question is unanswered, help us to find answer for this one
256. Which symbol can be used to indicate a "wild card" to substitute for one or more characters when searching for string in a database?
Answer
Correct Answer:
%
Note: This Question is unanswered, help us to find answer for this one
257. What happens if you omit the WHERE clause in a SQL DELETE query?
Answer
Correct Answer:
All records will be deleted.
Note: This Question is unanswered, help us to find answer for this one
258. What keyword is used to check for a range of values?
Answer
Correct Answer:
BETWEEN
Note: This Question is unanswered, help us to find answer for this one
259. What clause is used to sort data and group it?
Answer
Correct Answer:
GROUP BY
Note: This Question is unanswered, help us to find answer for this one
260. True or False? This query is valid the way it is structured. SELECT * FROM Prospects WHERE assignment_type <> 'Team' AND criteria is not null
Answer
Correct Answer:
True
Note: This Question is unanswered, help us to find answer for this one
261. The HAVING clause can be used for what purpose?
Answer
Correct Answer:
To be used for filtering based on the outcome of aggregate functions.
Note: This Question is unanswered, help us to find answer for this one
262. What is the term for a set of data elements (values) organized using rows and columns?
Answer
Correct Answer:
table
Note: This Question is unanswered, help us to find answer for this one
263. What is the term for a column (or set of columns) whose values uniquely identify every row in a table?
Answer
Correct Answer:
primary key
Note: This Question is unanswered, help us to find answer for this one
264. What character is used to connect a table name with a column name to create a fully qualified column name?
Answer
Correct Answer:
dot (.)
Note: This Question is unanswered, help us to find answer for this one
265. The DDL term "DROP" does what?
Answer
Correct Answer:
Deletes a database, table, index or column.
Note: This Question is unanswered, help us to find answer for this one
266. SELECT * FROM tablea, tableb WHERE tablea.DepartmentID = tableb.DepartmentID; Which of these keywords will have the same effect as the above query?
Answer
Correct Answer:
Inner Join
Note: This Question is unanswered, help us to find answer for this one
267. Which statement can be used to repeat the execution of a code block as long as a specified condition returns TRUE?
Answer
Correct Answer:
WHILE statement
Note: This Question is unanswered, help us to find answer for this one
268. How do you select a column named "FirstName" from a table named "Persons"?
Answer
Correct Answer:
SELECT FirstName FROM Persons;
Note: This Question is unanswered, help us to find answer for this one
269. Which will select the `name` of 'John' from the 'Person' table where `num_friends` is greater than 1?
Answer
Correct Answer:
SELECT name FROM Person WHERE num_friends > 1 AND name = 'John'
Note: This Question is unanswered, help us to find answer for this one
270. Which of the following is NOT true about a primary key constraints?
Answer
Correct Answer:
For every primary key there must be a foreign key.
Note: This Question is unanswered, help us to find answer for this one
271. What data is this statement trying to query from the Customers Table? SELECT * FROM Customers WHERE City LIKE '[!bsp]%'
Answer
Correct Answer:
Customers in cities NOT starting with "b" or "s" or "p."
Note: This Question is unanswered, help us to find answer for this one
272. Which clause indicates the table(s) from which data is to be retrieved?
Answer
Correct Answer:
FROM
Note: This Question is unanswered, help us to find answer for this one
273. Suppose table A has 5 rows and table B has 6 rows. You perform a cross join on these two tables. How many rows will it have?
Answer
Correct Answer:
30
Note: This Question is unanswered, help us to find answer for this one
274. What is the function that combines two strings and returns the combined string?
Answer
Correct Answer:
CONCAT()
Note: This Question is unanswered, help us to find answer for this one
275. Which of these is NOT a valid data type for a character string?
Answer
Correct Answer:
TEXTCHAR
Note: This Question is unanswered, help us to find answer for this one
276. What KEYWORD is used to filter groups?
Answer
Correct Answer:
HAVING
Note: This Question is unanswered, help us to find answer for this one
277. What is the default join type if omitted?
Answer
Correct Answer:
INNER
Note: This Question is unanswered, help us to find answer for this one
278. Which statement removes all rows from the "orders" table without removing the table structure?
Answer
Correct Answer:
TRUNCATE orders
Note: This Question is unanswered, help us to find answer for this one
279. Which of the following query will return PERSON first_name from table PERSON with last_name field null?
Answer
Correct Answer:
SELECT first_name FROM PERSON WHERE last_name IS NULL
Note: This Question is unanswered, help us to find answer for this one
280. What is PL/SQL?
Answer
Correct Answer:
It is a proprietary version of SQL used by Oracle
Note: This Question is unanswered, help us to find answer for this one
281. This example illustrates use of the FULL JOIN action. Which clauses must fill the three blanks for the query to be valid? _______ e1."Event_Name", v2."Venue" FROM "events" e1 _______ "venues" v2 ON (e1."VenueNo" = v2."VenueNo") _______ e1."Event_Name" ASC, v2."Venue" ASC
Answer
Correct Answer:
SELECT, FULL OUTER JOIN, ORDER BY
Note: This Question is unanswered, help us to find answer for this one
282. What is the result of "select * from table where 1"
Answer
Correct Answer:
Return all the rows from table
Note: This Question is unanswered, help us to find answer for this one
283. Choose correct clause: SELECT CountryCode, COUNT(*) FROM City GROUP BY CountryCode _____ COUNT(*) > 20;
Answer
Correct Answer:
HAVING
Note: This Question is unanswered, help us to find answer for this one
284. Which does not describe a database element?
Answer
Correct Answer:
organic list
Note: This Question is unanswered, help us to find answer for this one
285. Indexes can be created on existing tables so that information can be retrieved more quickly. Specifically, what are indexes created on?
Answer
Correct Answer:
columns
Note: This Question is unanswered, help us to find answer for this one
286. What keyword is used with aggregate functions to include every value in the calculation?
Answer
Correct Answer:
ALL
Note: This Question is unanswered, help us to find answer for this one
287. The UNION ALL operator performs which of the following actions?
Answer
Correct Answer:
Returns the output from the query before and the query after the operator including duplicates.
Note: This Question is unanswered, help us to find answer for this one
288. Which of the following is NOT an explicit data type reference?
Answer
Correct Answer:
null
Note: This Question is unanswered, help us to find answer for this one
289. UNION ALL is different from a UNION command in that...
Answer
Correct Answer:
UNION ALL will not eliminate duplicate rows
Note: This Question is unanswered, help us to find answer for this one
290. What is the name of a result that returns all the rows in all the tables listed in the query?
Answer
Correct Answer:
Cartesian product
Note: This Question is unanswered, help us to find answer for this one
291. Which wildcard character means "match any number of occurrences of any character"?
Answer
Correct Answer:
percent (%)
Note: This Question is unanswered, help us to find answer for this one
292. What records would the result set of this query include? SELECT * FROM tableA LEFT OUTER JOIN tableB ON tableA.key = tableB.key
Answer
Correct Answer:
All records from tableA; 0 or more records from tableB
Note: This Question is unanswered, help us to find answer for this one
293. What is the correct procedure to create and use a cursor?
Answer
Correct Answer:
Declare cursor > Open cursor > Fetch row from the cursor > Process fetched row > Close cursor > Deallocate cursor
Note: This Question is unanswered, help us to find answer for this one
294. What is the proper syntax of the keyword LIMIT to display 5 results after starting at record 4?
Answer
Correct Answer:
LIMIT 4, 5
Note: This Question is unanswered, help us to find answer for this one
295. Which is the correct order for a proper SQL query?
Answer
Correct Answer:
SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY
Note: This Question is unanswered, help us to find answer for this one
296. What is the first query to run in a statement that contains subqueries?
Answer
Correct Answer:
innermost
Note: This Question is unanswered, help us to find answer for this one
297. If a foreign key constraint is violated, the default action taken by the DBMS is what?
Answer
Correct Answer:
It is not possible to violate a foreign key constraint. The modification is rejected
Note: This Question is unanswered, help us to find answer for this one
298. Where is the GROUP BY clause placed in the sequence of statements?
Answer
Correct Answer:
before ORDER BY
Note: This Question is unanswered, help us to find answer for this one
299. What is the name of the category of functions used to summarize data?
Answer
Correct Answer:
aggregate
Note: This Question is unanswered, help us to find answer for this one
300. What is the typical filename extension of a SQL file?
Answer
Correct Answer:
.sql
Note: This Question is unanswered, help us to find answer for this one