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

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

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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 is the default order of sort in ORDER BY clause?

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following is not an SQL aggregate function?

  

  

  

  

  

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

  

  

  

  

You are required to buy a license for MySQL if

  

  

  

  

  

MySQL runs on which operating systems?

  

  

  

  

Which SQL statement is used to return only different values?

  

  

  

  

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

  

  

  

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

  

  

  

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

  

  

  

  

If you want to undo a GRANT, you should use

  

  

  

  

  

Where is metadata stored in MySQL?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following is not a valid aggregate function?

  

  

  

  

Which of the following is not an SQL aggregate function?

  

  

  

  

  

USE keyword is used to select a ___________

  

  

  

  

Which of the following is NOT supported by MySQL

  

  

  

  

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

  

  

  

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

  

  

  

  

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

  

  

  

  

  

MySQL Access security is controlled through?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

What is Row?

  

  

  

  

How many TRIGGERS are allowed in MySql table?

  

  

  

  

What is DML?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

When do we use a HAVING clause?

  

  

  

  

Can I define multiple unique constraints on a table?

  

  

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

  

  

  

  

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

  

  

  

  

How to view all Triggers in MySQL?

  

  

  

  

With SQL, how do you select all the records from a table named "Persons" where the "FirstName" is "Aru" and the "LastName" is "Sum"?

  

  

  

  

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

  

  

  

  

  

A table may be joined to itself.

  

  

  

What MySQL property is used to create a surrogate key 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 ways below are the correct way to get the current date?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

What kind of replication is supported by the MySQL server?

  

  

  

  

Which of the following is not a MySQL Operator?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

How do I find out all databases starting with ‘test to which I have access to?

  

  

  

  

What does SQL stand for?

  

  

  

  

The USE command?

  

  

  

  

Transactions are used to treat sets of SQL statements atomically.

  

  

Can DISTINCT command be used for more than one column?

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

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

  

  

  

  

BLOB data type can have default column value.

  

  

Which of the following is NOT available in MySQL?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

The “Mysql command line tool” formats are bounded by

  

  

  

  

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

  

  

Which of these is not a valid name for a column

  

  

  

  

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

  

  

  

  

Which function used to get the current time in mysql?

  

  

  

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

  

  

  

  

  

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.

  

  

MySql | Which of the following is available in MySQL:

  

  

  

  

  

Commands passed to the MySQL daemon are written in.

  

  

  

  

What is DCL?

  

  

  

  

MySQL supports the complete SQL99 standard

  

  

What is Column?

  

  

  

  

What is DDL?

  

  

  

  

What is Table?

  

  

  

  

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

  

  

  

  

  

How much character are allowed to create database name?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Enum values are stored according to their index numbers

  

  

Can joins be nested?

  

  

A user with RELOAD priveliges can

  

  

  

  

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

  

  

  

  

Which statement is used to access an existing Database?

  

  

  

  

How much storage space does DATETIME require?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How is structure of a table got 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.