๐Ÿงช SQL MCQ Quiz Hub

SQL MCQ SET 1

Choose a topic to test your knowledge and improve your SQL skills

The expression 12 DIV 5 evaluates to ____________





โœ… Correct Answer: 2

If the PIPES_AS_CONCAT is disabled, 'abc' || 'xyz' results in ____________





โœ… Correct Answer: 2

'abc' || 'xyz', when PIPES_AS_CONCAT is enabled, results in ____________





โœ… Correct Answer: 3

The expression 2 BETWEEN 2 AND 5 results in ____________





โœ… Correct Answer: 1

The expression HI LIKE NULL results in _____________





โœ… Correct Answer: 3

Which of the following is the correct order of precedence (high to low)?





โœ… Correct Answer: 1

0x61 + 0 results in _____________





โœ… Correct Answer: 3

The AUTO_INCREMENT column attribute is best used with which type?





โœ… Correct Answer: 2

Which datatype is best suited to store currency values?





โœ… Correct Answer: 4

If a column is expected to store values up to 2 million, the best datatype for it is _____________





โœ… Correct Answer: 4

Which of these types store the longest length of strings?





โœ… Correct Answer: 4

Which of these values is not valid as an AUTO_INCREMENT value?





โœ… Correct Answer: 1

If an integer column is used for the values in range 1 to 99999, the best suitable datatype is ____________





โœ… Correct Answer: 2

INT2 maps to MySQL type _____________





โœ… Correct Answer: 2

INT3 maps to MySQL type _____________





โœ… Correct Answer: 3

Which of these return a result to the client?





โœ… Correct Answer: 1

Which of these is defined to execute when the table is modified only?





โœ… Correct Answer: 3

What executes on a time activated basis according to a schedule?





โœ… Correct Answer: 2

Which character does the mysql client program recognize as a statement delimiter?





โœ… Correct Answer: 3

Which command is used to redefined the mysql delimiter?





โœ… Correct Answer: 3

Which of the following statements does not modify the table?





โœ… Correct Answer: 4

To produce a stored function, which statement is used?





โœ… Correct Answer: 2

How many values can be returned from a given stored function?





โœ… Correct Answer: 2

How many values can be returned from a stored procedure?





โœ… Correct Answer: 1

Suppose a stored function named PI() is written in the database sampdb. How would it be called?





โœ… Correct Answer: 2

Which privilege must be given to the database to create a stored function or procedure?





โœ… Correct Answer: 1

Which variable is set to zero when automatic privilege granting is not needed?





โœ… Correct Answer: 1

Which procedure parameter enables the caller to pass in a value and get back a value?





โœ… Correct Answer: 3

For the same input parameters, if the stored function returns the same result, it is called _____________





โœ… Correct Answer: 1

What is abc in the following MySQL statement?





โœ… Correct Answer: 1

Which statement is used to create a trigger?





โœ… Correct Answer: 1

For which of the following are triggers not supported?





โœ… Correct Answer: 4

Which statement is used to remove a trigger?





โœ… Correct Answer: 3

Before MySQL 5.1.6 which privilege was required to create and drop triggers?





โœ… Correct Answer: 3

What is abc in the following MySQL statement?





โœ… Correct Answer: 1

Which of these is a stored program associated with a schedule?





โœ… Correct Answer: 2

Which of the following lines is used to turn on the event scheduler?





โœ… Correct Answer: 1

Which statement is used to check the status of the event scheduler at runtime?





โœ… Correct Answer: 4

Which value of event_scheduler enables checking status but not changing it at runtime?





โœ… Correct Answer: 3

Which log does the event scheduler log to?





โœ… Correct Answer: 1

Which clause specifies periodic execution at fixed intervals?





โœ… Correct Answer: 1

To create or drop events for a database, which privilege should be granted?





โœ… Correct Answer: 4

The default definer of an event is the user who _______________





โœ… Correct Answer: 2

The creation of a stored program is similar to the definition of a _______________





โœ… Correct Answer: 3

When the security context enables carefully written stored programs to be set up that provide controlled access to tables for users, it is called __________





โœ… Correct Answer: 1

When a user creates a stored program that accesses sensitive data but forgets that other people who can invoke the object have the same access, the security context is __________





โœ… Correct Answer: 2

A stored procedure is invoked using the statement __________





โœ… Correct Answer: 3

What produces result sets?





โœ… Correct Answer: 1

Which privilege is enabled to create of alter a stored function?





โœ… Correct Answer: 1