0% found this document useful (0 votes)
51 views11 pages

DBT - Mock4 - 0923 For Students

Uploaded by

ishikadahiya22
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views11 pages

DBT - Mock4 - 0923 For Students

Uploaded by

ishikadahiya22
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Correct

Q. No. Question Option1 Option2 Option3 Option4


Option No.
In an RDBMS, another word for Column is
1 Row Tuple Attribute Applet Option3
__________.
2 __________ is the fastest RDBMS. Oracle Informix Progress MS SQL Server Option2
For a user, the privilege to access the Command level Logging in
3 Object level security File level security Option1
tables of other users is known as ________. security security
4 Null value has an ASCII value of _____. 0 32 64 255 Option1
In a SELECT statement, the WHERE Client RAM to
Server RAM to Server RAM to Server disk to
5 clause is used to retrieve rows from server end Option3
client end server disk server RAM
_______.
Logical operator __________ has higher
6 NOT AND Both of the above None of the above Option3
precedence than OR.
The component of SQL that is used for
7 inserting rows in tables is known as _____. DDL DML DCL DQL Option2

The component of SQL that is used for


granting and revoking privileges is
8 DDL DML DCL DQL Option3
known as _______.

Which one of the following is an invalid


9 EMP_2008 Emp_2008 emp_2008 2008_EMP Option4
table name?
In MySQL, you can have a maximum of
10 _______ columns per table. 4096 254 255 256 Option1

a two-dimensional
11 Each table is perceived as a flat structure. a linked structure. None of the above Option2
structure.
Which one is a TCL (or DTL) statement?
12 update Truncate Alter RollBack Option4

Which of the following is NOT a type of


13 SQL statement? DDL DCL DNL DML Option3

Select EMPNO
Select * from EMP Select EMPNO from where EMPNO =
Which of the following statement contain Select EMPNO
14 where EMP where 56949 and Option4
an error? from EMP;
EMPNO=493945; EMPNO=493945; LASTNAME='SMIT
H';
Correct
Q. No. Question Option1 Option2 Option3 Option4
Option No.
The transaction control that prevents
15 more than one user from updating data in Locks Commits Rollbacks Savepoints Option1
a table is called __________.
Which of the following has the same
16 <= := != > Option3
meaning as <>?
Data is raw facts whereas Information is
17 TRUE FALSE Option1
meaningful data.
In an RDBMS, relationship between 2
18 TRUE FALSE Option2
files is maintained programmatically.
DBMS does not support Distributed
19 TRUE FALSE Option1
atabases.
20 Null value is independent of datatype. TRUE FALSE Option1
The Relational operator < has higher
21 TRUE FALSE Option2
precedence than >.
By default, the ORDER BY clause returns
22 TRUE FALSE Option1
output in ascending order.
23 You can commit to a savepoint. TRUE FALSE Option2
24 Dual is a system table. TRUE FALSE Option1
The work done by the computer to
25 convert Information into Data is known TRUE FALSE Option2
as processing.
DBMS does not support Client-Server
26 TRUE FALSE Option1
architecture.
In MySQL, the upper limit for table name
27 TRUE FALSE Option1
is 30 characters.
You can specify an Alias only for
28 computed fields and not for ordinary TRUE FALSE Option2
columns of a table.
You can Commit to a savepoint but you
29 TRUE FALSE Option2
cannot Rollback to a savepoint.
_____ holds the definitions of all of the
30 database data disctionary data source data mining Option2
data tables.
The ____ operator is used for pattern
31 DISTINCT LIKE GROUP BY ORDER BY Option2
matching.
All SQL
Only DML
32 Rollback and Commit affect Only DDL statements Both (a) and (b) statements Option1
statements
executed
Which of the following is invalid rollback ROLLBACK TO
33 ROLLBACK; ROLLBACK WORK; None of the above Option4
statement in MySQL? SAVEPOINT A;
Correct
Q. No. Question Option1 Option2 Option3 Option4
Option No.
The delete
The delete statement The delete The delete
Omitting the WHERE clause from a statement will fail
will prompt the user statement will fail statement will
34 DELETE statement has which of the because there are Option4
to enter the criteria because of syntax remove all records
following effects? no records to
for the deletion. error. from the table.
delete.
The transaction control that prevents
35 more than one user from updating data in Locks Commits Rollbacks Savepoints Option1
a table is called __________.
Accepts a number & Accepts a character Accepts a number
36 CHAR( ) function returns the & returns the & returns the None of the above Option1
character number number
Saves the changes
Saves the previous Saves the changes
37 A COMMIT statement for the current None of the above Option1
changes for all sessions
session
How many columns are presented after
executing this query:
SELECT
38 3 2 1 ERROR Option3
address1||','||address2||','||address2
"Address" FROM employee;

The ORDER BY clause whenever used


39 should always be the last clause of an TRUE FALSE Option1
SQL query
satisfy more than
Choose the Incorrect option related to There is no Security Not support
40 8 rule of Dr. E.F. None Option3
DBMS of data distributed database
Codd
Choose the correct pattern Matching sign
41 for matching a single character. _ ? * % Option1

All statements
Only DML
42 Rollback and Commit affect Only DDL statements Both (1) and (2) executed in Option1
statements
SQL*PLUS
In order to select data that is within a
43 range of values, the "BETWEEN" operator TRUE FALSE Option1
is used.
One row many One column and One row and One Many Rows and
44 The DUAL table has Option3
columns many Rows Column many columns
Correct
Q. No. Question Option1 Option2 Option3 Option4
Option No.
____ makes a string of certain length by
45 adding a certain set of characters to the LTRIM LPAD SUBSTR INSTR Option2
left
Wildcards used for pattern matching are
46 _______. * and ? $ and # @and! % and _ Option4

In MySQL, the upper limit for nested


47 0 32 64 255 Option4
functions is upto __________ levels.
_____ functions can be used to make your
Replace and
48 queries case-insensitive. Upper and lower Lpad and rpad Ltrim and rtrim Option1
translate
Which of the following is not a group
49 Avg() sqrt() Sum() Max() Option2
function?
To lock the rows of a table manually, you
can use a Select statement with the ______
50 For Update For Delete For Insert For Lock Option1
clause.

_____ function can be used to make


51 character column data as right-justified. Lpad Rpad Ljustify Rjustify Option1

52 Null value is independent of datatype. TRUE FALSE Option1


53 You can commit to a savepoint. TRUE FALSE Option2
MySQL ifnull( ) function can be used only
54 TRUE FALSE Option2
with number datatype.
Log(m,n) will return the Log of m to the
55 TRUE FALSE Option2
base n.
The default date format in MySQL is
56 TRUE FALSE Option1
‘YYYY-MM-DD’.
Group functions are not allowed in the
57 TRUE FALSE Option1
WHERE clause of Select statement.
Any operation done with null, returns
58 TRUE FALSE Option1
null.
Which line in the following SELECT select dept, No errors in this
59 from emp group by empid; Option3
statement will produce an error? avg(salary) statement
Correct
Q. No. Question Option1 Option2 Option3 Option4
Option No.
Which of the following is the correct HAVING, GROUP BY, GROUP BY, HAVING, WHERE,
60 2. WHERE, GROUP Option2
order of precedence of SQL clauses? WHERE HAVING, WHERE GROUP BY
BY, HAVING
Fill in the blank with a numeric function
to get 15 as the output.
61 SELECT __________(-15) "Absolute" FLOOR MOD EXP ABS Option4
FROM DUAL;

Which of the following is NOT a GROUP


62 function? LENGTH() AVGO MAX() COUNT() Option1

SELECT SELECT
SELECT
2. SELECT (column_name) (column_name)
(column_name)
(column_name) FROM HAVING (function
Which of the following is the correct HAVING (function
FROM (entity_name) (entity_name) condition)
63 syntax for using the HAVING clause? condition) GROUP Option2
GROUP BY HAVING (function FROM
BY
(column_name) condition) (entity_name)
(column_name)FRO
HAVING (function GROUP BY GROUP BY
M (entity_name);
condition); (column_name); (column_name);
Which of the following SQL functions can
64 TO_CHAR LOWER LPAD MAX Option4
operate on any datatype?
To include certain
To put returned To execute certain To include certain
Which of the following uses of the data groups based
65 data into sorted data groups based data groups based Option4
HAVING clause are appropriate? on unknown
order. on known criteria. on known criteria
criteria.
Which of the following is not a group
66 LTRIM2. MAX MAX MIND STDDEV Option1
function.
Select CEIL(MOD(POWER(2,3),
FLOOR(3.5))) from dual;
67 What is the result of the above 0 1 2 4 Option3
statement?

__________ makes a string of certain length


by adding a certain set of characters to
68 LTRIM LPAD SUBSTR INSTR Option4
the left
Correct
Q. No. Question Option1 Option2 Option3 Option4
Option No.
The DESCRIBE
DEPT statement
Evaluate the SQL statements
displays the
CREATE TABLE dept (dept_idINT (2), The DESCRIBE
The ROLLBACK structure of the
dname VARCHAR (14), Loc VARCHAR DEPT statement
statement frees the The DESCRIBE DEPT DEPT table only if
(13)); displays the
69 storage space statement returns an there Option4
ROLLBACK; structure of the
occupied by the error. is a COMMIT
DESCRIBE DEPT DEPT table
DEPT table. statement
What is true about the statements?
introduced before
the ROLLBACK
statement.

Three joinsmake
If five tables are given & three join
Cartesian product relation between We cannot apply
70 conditions are given & select Query is None of above Option2
of first 3 tables four tables& keep 3 joins on 5 tables
applied then what will happen?
the fifth independent
The BLOB datatype stores what type of
71 Character data Binary data Numeric data ASCII data Option2
data?
inner query
The inner query The outer query fires firesfor every row
72 In a correlated query no order Option3
fires first first returned by outer
query
The limit of level of nesting is __________
73 255 1024 1000 2000 Option1
subqueries in SQL
74 EXISTS,SOME, ANY are operators in SQL TRUE FALSE Option1

75 COUNT(expr)function returns the TRUE FALSE Option1


number of rows where expr is not null.
A Rollback statement cannot be used to
76 TRUE FALSE Option2
close a transaction.
Which of the following is auto
77 committed? insert delete update truncate Option4

Which SQL commands are used to


78 create,modify and delete database DDL DML DCL DQL Option1
structure but not data?
Correct
Q. No. Question Option1 Option2 Option3 Option4
Option No.
The second parameter in the ROUND
79 function specifies the number of digits TRUE FALSE Option1
after the decimal point.
The join which performs Cartesian
80 product is called __________. Left join Left outer join Right outer join Cross join Option4

Evaluate this SQL statement: SELECT


e.employee_id, (.15* e.salary) + (.5 *
e.commission_pct) + (s.sales_amount * There will be no
The value displayed The value displayed
(.35 * e.bonus)) AS CALC_VALUE FROM difference in the
in the CALC_VALUE in the CALC_VALUE An error will be
81 employees e, sales WHERE e.employee_id value displayed in Option3
column will be column will be reported.
= s.emp_id; What will happen if you the CALC_VALUE
lower. higher.
remove all the parentheses from the column.
calculation?

Evaluate this SQL statement: SELECT


ename, sal, 12*sal+100 FROM EMP; The
SAL column stores the monthly salary of SELECT ename,
No change is SELECT ename, sal, SELECT ename,
the employee. Which change must be sal+100,*12 FROM
82 required to achieve 12*(sal+100) FROM sal, (12*sal)+100 Option2
made to the above syntax to calculate the emp;
the desired results. emp; FROM emp;
annual compensation as "monthly salary
plus a monthly bonus of $100, multiplied
by 12"?
The table is Tables are Tables are created
Which describes the default behavior Tables are created in
83 accessible to all created in your in the DBA Option3
when you create a table? the public schema.
users. schema. schema.
Evaluate the SQL statement: SELECT
ROUND (TRUNCATE (MOD (1600, 10),-
84 1), 2) FROM dual; What will be 0 1 0 an error statement Option1
displayed?
Correct
Q. No. Question Option1 Option2 Option3 Option4
Option No.

You added a PHONE-NUMBER column of


INT data type to an existing EMPLOYEES
table. The EMPLOYEES table already
contains records of 100 employees. Now,
you want to enter the phone numbers of
85 MERGE INSERT UPDATE ADD Option3
each of the 100 employees into the table
some of the employees may not have a
phone number available. Which data
manipulation operation do you perform?

The main query


fails because the
the main query
You define a multiple-row subquery in the main query the main query multiple-row
executes with all
the WHERE clause of an SQL query with a executes with the executes with the subquery cannot
86 the values Option4
comparison operator"=" What happens first value returned last value returned be used with the
returned by the
when the main query is executed? by the subquery by the subquery comparison
subquery
operator.

retrieve data
based on an
A subquery can be used to _________. create groups of sort data in a specific convert data to a
87 unknown Option4
data order different format
condition

You need to display the last names of SELECT last_name


SELECT last_name SELECT
those employees who have the letter "A" SELECT last_name FROM EMP
FROM EMP WHERE last_name FROM
88 as the second character in their names. FROM EMP WHERE WHERE last name Option1
last_name EMP WHERE last
Which SQL statement displays the last name='*A% LIKE '* a%
LIKE'_A%; name ='* _A%;
required results?
How should a many-to-many relationship By adding an join By adding an By adding union By adding
89 Option2
be handled? table intersection table table Cartesian table
Within MySQL block, screen input and
90 screen output is not recommended. TRUE FALSE Option1
Correct
Q. No. Question Option1 Option2 Option3 Option4
Option No.
DCL commands are allowed within a
91 MySQL block. TRUE FALSE Option2

To break and come out of a loop in


92 MySQL, we can use LEAVE statement. TRUE FALSE Option1

93 MySQL is a __________ GL. 1 GL 2 GL 3 GL 4 GL Option4


When you create a variable in MySQL
94 that has not been initialized, it stores a Blank 0 Null Garbage Option3
________ value.
The if elseif else end if construct is
95 Case Round Trunc Sign Option1
similar to _______ function of SQL.
In MySQL, we can use __________ for single
96 ** -- \\ // Option2
line comment.
logical true or false
97 In MySQL, A __________ variable can store Char Binary Boolean Option3
value.
An if-then All exit conditions
Explicit exit
Counter variables statement is for while loops are
Which of the following statements is true statements are
98 are required in while needed to signal handled in the exit Option2
about while loops? required in while
loops. when a while loop when clause.
loops.
should end.
Comments in a MySQL code are inserted
99 -- /**/ Both (1) and (2) # Option3
using
If a nested block
For nested blocks defines an object
The reverse is not
an object defined in with the same
true; objects defined
a parent block is name as an object
100 Which of the following is true? in a child block are All of the above Option4
available within all in its parent block
not visible to the
its child blocks then only the
parent.
(nested blocks). local object is
visible.
The MySQL blocks can contain _________ &
101 DML,DCL DML,DDL GRANT,REVOKE TCL,DML Option4
__________ statements
MySQL extends SQL by adding control
structures found in other procedural
102 TRUE FALSE Option1
language.
Correct
Q. No. Question Option1 Option2 Option3 Option4
Option No.
DDL commands can be used in MySQL
103 block. TRUE FALSE Option1

MySQL supports boolean data type.


104 TRUE FALSE Option1
Executable section Exception section
Declaration section
________ is a compulsory section of a marked by the marked by the
105 marked by the All of the above Option2
MySQL block. keyword BEGIN …. keyword
keyword DECLARE
END EXCEPTION
______ loop if used properly can be used to
ensure that the statements within the
loop are executed iteratively but at least
once.
While loop…end for I in 1..10
106 a. Repeat Repeat All of the above Option1
loop: loop……end loop:
b. While loop …….end loop;
c. for I in 1..10 loop ……… end loop;
d. All of the above

Identifiers in MySQL can contain upto


107 _____ characters. 255 30 1000 none Option2

You can fetch backwards in MySQL


108 TRUE FALSE Option2
cursors.
You can create a cursor based on a join of
109 TRUE FALSE Option1
two tables.
No upper limit on the number of indexes
110 TRUE FALSE Option1
per table.
Null values are stored in an index.
111 TRUE FALSE Option2

Dropping a table has the following effects The index will


The index will be The index will be
112 on a non-unique index created for the No effect contain NULL Option2
dropped rendered invalid
table. values
The query associated with a cursor is
113 Declare phase Open phase Fetch phase Close phase Option4
executed in
When we combine multiple columns in a
114 Composite Multiple Multicol Complicated Option1
single index, it is known as a _____ index.
Correct
Q. No. Question Option1 Option2 Option3 Option4
Option No.
In MySOL if you need to deal with a group
of rows, then you must place returned Select statement
115 Cursors into clause Code storage Option2
data into b.

Which of the following database objects


116 stores table column data and row Tables Sequences Indexes Views Option3
reference information?
The __________ statement retrieves the
117 current row and advances the cursor to SET GET MOVE None of the above Option4
the next row.
The close statement disables the cursor
118 and the active set becomes undefined. TRUE FALSE Option1

Open—Declare--
Declare--Fetch and Declare—Open-- Declare--Open--
________ is the sequence of steps for Fetch and Process
119 Process Iteratively-- Close-- Fetch and Fetch and Process Option3
handling Explicit cursors Iteratively--Close
Open—Close Process Iteratively Iteratively--Close

The ____________ step actually executes the


120 SELECT query associated with an Explicit Declare Open Fetch Close Option2
cursor

You might also like