Database - Sql Test

Test Instructions :

1. The Test is 1hr duration.
2. The Test Paper consists of 30 questions. The maximum marks are 30.
3. All the questions are multiple choice question type with three options for each question.
4. Out of the three options given for each question, only one option is the correct answer.
5. Each question is allotted 1 mark for each correct response.
6. 0.25 will be deducted for incorrect response of each question.
Start Test

   Time Left : 00 : 30    : 00

How many TRIGGERS are allowed in MySql table?

  

  

  

  

In a SELECT with a GROUP BY clause, a WHERE clause, and a HAVING clause, the WHERE conditions are applied before the HAVING conditions.

  

  

  

  

The result of a SELECT statement can contain duplicate rows.

  

  

  

The ............. statement is used to delete a table.

  

  

  

  

The main MySQL program that does all the data handling is called?

  

  

  

  

With SQL, how do you select all the records from a table named "Persons" where the "LastName" is alphabetically between (and including) "Hansen" and "Pettersen"?

  

  

  

Which of these field types would be best to hold a .jpg image?

  

  

  

  

What is Row?

  

  

  

  

On executing DELETE command, if you get an error "foreign key constraint" what does it imply?

  

  

  

  

MySQL runs on which operating systems?

  

  

  

  

Which of the following is used to delete an entire MYSQL database?

  

  

  

  

What MySQL property is used to create a surrogate key in MySQL?

  

  

  

  

________ is an open source DBMS product that runs on UNIX, Linux and Windows.

  

  

  

  

With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?

  

  

  

  

What's the difference between the DESCRIBE and SHOW FIELDS FROM commands?

  

  

  

Which of the following is NOT supported by MySQL

  

  

  

  

Which of the following is not a character manipulation function?

  

  

  

  

Which authentications are required for login into Mysql command line tool?

  

  

  

  

A NULL value is treated as a blank or 0.

  

  

  

MySQL supports the complete SQL99 standard

  

  

In a LIKE clause, you can could ask for any value ending in "qpt" by writing

  

  

  

  

Given an employees table as follows:   emp_id emp_name 1 Brush 2 Jerrin  what value will be return by below query ? Select count(*) from employees  

  

  

  

  

SQL is not case sensitive. SELECT is the same as select.

  

  

To use MySQL on your computer, you'll need?

  

  

  

  

Which statement is used to access an existing Database?

  

  

  

  

Which function used to get the current time in mysql?

  

  

  

Mysql command line tool is used to show “how many rows are returned and how long SQL command took to execute”

  

  

  

  

USE keyword is used to select a ___________

  

  

  

  

MySQL Access security is controlled through?

  

  

  

  

With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"?

  

  

  

  

  

A view is nothing but a ________ table or a stored query

  

  

  

  

How much character are allowed to create database name?

  

  

  

  

What is DCL?

  

  

  

  

Use the .............. to delete the data inside the table, and not the table itself?

  

  

  

  

Can joins be nested?

  

  

In PHP in order to access MySQL database you will use:

  

  

  

  

MySQL is

  

  

  

  

Enum values are stored according to their index numbers

  

  

To remove duplicate rows from the result set of a SELECT use the following keyword:

  

  

  

  

Commands passed to the MySQL daemon are written in.

  

  

  

  

BLOB data type can have default column value.

  

  

If you want to undo a GRANT, you should use

  

  

  

  

  

With SQL, how can you insert "Olsen" as the "LastName" in the "Persons" table?

  

  

  

Which SQL statement is used to extract data from a database?

  

  

  

  

  

A user with RELOAD priveliges can

  

  

  

  

What is Column?

  

  

  

  

What does SQL stand for?

  

  

  

  

Can I define multiple unique constraints on a table?

  

  

If an ENUM column is declared NOT NULL, its default value is the first element of the list of allowed values.

  

  

  

  

What SQL clause is used to restrict the rows returned by a query?

  

  

  

  

Which of these is not a valid name for a column

  

  

  

  

If you're writing a client using the C language API, your source code should include the following line at the top:

  

  

  

  

What is a candidate key?

  

  

  

  

What is Table?

  

  

  

  

What type of lock will deny users any access to a table?

  

  

  

  

  

Which of these commands will delete a table called XXX if you have appropriate authority:

  

  

  

  

Can I call a trigger directly called from an application?

  

  

Which of the following can add a row to a table?

  

  

  

  

When do we use a HAVING clause?

  

  

  

  

Which of the following commands should be used to create a database named “student”?

  

  

  

  

What is DML?

  

  

  

  

Which command is used for showing current date and time in Mysql command line tool?

  

  

  

  

Which command is used in Mysql command line tool to return to window command shell?

  

  

  

  

Which of the following DBMSs do not have a native PHP extension?

  

  

  

  

  

With SQL, how do you select a column named "FirstName" from a table named "Persons"?

  

  

  

Which of the following is not a valid aggregate function?

  

  

  

  

What is DDL?

  

  

  

  

What does the DESC keyword do in the following query? SELECT * FROM MY_TABLE WHERE ID > 0 ORDER BY ID, NAME DESC

  

  

  

  

  

An outer join requires each record in the two joined tables to have a matching record.

  

  

  

  

With SQL, how can you return the number of records in the "Persons" table?

  

  

  

  

Which command is used for taking “server side help” in Mysql command line tool

  

  

  

  

Which SQL statement is used to insert a new data in a database?

  

  

  

  

Primary Key does allow the Null Values. where as in Unique key doesn't accept the Null values.

  

  

Which SQL statement is used to delete data from a database?

  

  

  

  

Which of these is a valid call to a function (watch the spaces carefully!)

  

  

  

  

Where is metadata stored in MySQL?

  

  

  

  

How can we get the number of records or rows in a table?

  

  

  

  

The USE command?

  

  

  

  

Which one will delete the table data as well as table structure?

  

  

Internally information is held in tables. Which of these is NOT a valid format:

  

  

  

  

  

With SQL, how do you select all the columns from a table named "Persons"?

  

  

  

  

Which command is used on Mysql command line tool to return to window command shell?

  

  

  

  

Which of the following is NOT available in MySQL?

  

  

  

  

Which of the following ways below are the correct way to get the current date?

  

  

  

  

Which of the following file extension is a valid MyISAM file extension?

  

  

  

  

Which of the following is the correct SQL statement to use to remove rows from a table?

  

  

  

  

What is an open source DBMS product that runs on UNIX, Linux and Windows

  

  

  

  

A SELECT command without a WHERE clause returns?

  

  

  

  

What MySQL property is used to create a surrogate key in MySQL?

  

  

  

  

What will happen at the end of the following sequence of SQL commands? BEGIN TRANSACTION DELETE FROM MYTABLE WHERE ID=1 DELETE FROM OTHERTABLE ROLLBACK TRANSACTION

  

  

  

  

  

Which SQL statement is used to return only different values?

  

  

  

  

How to view all Triggers in MySQL?

  

  

  

  

The "father" of MySQL is

  

  

  

  

How many distinct, different values can you hold in an enum field?

  

  

  

  

Which of these field types would be best to hold a film title?

  

  

  

  

Sometimes the expression "select count(*)" will return fewer rows than the expression "select count(value)".

  

  

With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table?

  

  

  

Which of the following is not an SQL aggregate function?

  

  

  

  

  

You are required to buy a license for MySQL if

  

  

  

  

  

What is the command for counting all the rows in a table in MySQL?

  

  

  

  

Note:
  • Click the 'Submit Test' button given in the bottom of this page to Submit your answers.
  • Test will be submitted automatically if the time expired.
  • Don't refresh the page.