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

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

  

  

  

  

  

Which SQL statement is used to update data in a database?

  

  

  

  

Which of the following is not a MySQL Operator?

  

  

  

  

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

  

  

  

  

Can I call a trigger directly called from an application?

  

  

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

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

What kind of replication is supported by the MySQL server?

  

  

  

  

When do we use a HAVING clause?

  

  

  

  

A NULL value is treated as a blank or 0.

  

  

  

The result of a SELECT statement can contain duplicate rows.

  

  

  

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"?

  

  

  

User() fucntion returns the current users user name and ___________

  

  

  

  

A table may be joined to itself.

  

  

  

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

  

  

What is Row?

  

  

  

  

Which is the default order of sort in ORDER BY clause?

  

  

With SQL, how can you insert a new record into the "Persons" table?

  

  

  

Can I define multiple unique constraints on a 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.

  

  

  

  

What is Column?

  

  

  

  

MySQL runs on which operating systems?

  

  

  

  

USE keyword is used to select a ___________

  

  

  

  

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

  

  

  

  

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

  

  

  

  

The program called mysql is

  

  

  

  

  

MySQL supports the complete SQL99 standard

  

  

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

  

  

  

  

  

If you want to undo a GRANT, you should use

  

  

  

  

  

Where is metadata stored in MySQL?

  

  

  

  

Which SQL statement is used to return only different values?

  

  

  

  

MySql | Which of the following is available in MySQL:

  

  

  

  

  

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

  

  

  

  

What is DML?

  

  

  

  

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

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

You are required to buy a license for MySQL if

  

  

  

  

  

A SELECT command without a WHERE clause returns?

  

  

  

  

Can joins be nested?

  

  

The USE command?

  

  

  

  

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

  

  

  

  

What is DDL?

  

  

  

  

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

  

  

  

  

How much storage space does DATETIME require?

  

  

  

  

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

  

  

  

  

Which of the following is NOT supported by MySQL

  

  

  

  

The "father" of MySQL is

  

  

  

  

How many TRIGGERS are allowed in MySql table?

  

  

  

  

mysql_pconnect() is used to make a persistent connection to the database which means a SQL link that do not close when the execution of your script ends.

  

  

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

  

  

  

One of the early proponents of relational database who laid down many of the principles we use to this day was:

  

  

  

  

  

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

  

  

  

  

Enum values are stored according to their index numbers

  

  

Which SQL keyword is used to sort the result-set?

  

  

  

  

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

  

  

  

  

MySQL comes with as standard with client libraries for:

  

  

  

  

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

  

  

  

  

  

In a LIKE clause, you can ask for any 6 letter value by writing?

  

  

  

  

MySQL is

  

  

  

  

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

  

  

  

  

BLOB data type can have default column value.

  

  

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

  

  

  

  

What is Table?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How to view all Triggers in MySQL?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

A user with RELOAD priveliges can

  

  

  

  

The “Mysql command line tool” format the results in which of the following format:

  

  

  

  

Which of the following is not an SQL aggregate function?

  

  

  

  

  

Which of the following is not an SQL aggregate function?

  

  

  

  

  

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

  

  

  

  

Which of these is not a valid name for a column

  

  

  

  

What is DCL?

  

  

  

  

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

  

  

MySQL Access security is controlled through?

  

  

  

  

Can DISTINCT command be used for more than one column?

  

  

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

  

  

  

  

  

Transactions are used to treat sets of SQL statements atomically.

  

  

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

  

  

  

  

How much character are allowed to create database name?

  

  

  

  

How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table?

  

  

  

  

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

  

  

  

  

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

  

  

  

How is structure of a table got in MySQL?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

What does SQL stand for?

  

  

  

  

The “Mysql command line tool” formats are bounded by

  

  

  

  

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

  

  

  

  

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.