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

When do we use a HAVING clause?

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

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

  

  

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

  

  

Which of the following is not an SQL aggregate function?

  

  

  

  

  

BLOB data type can have default column value.

  

  

A NULL value is treated as a blank or 0.

  

  

  

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

  

  

  

  

How to view all Triggers in MySQL?

  

  

  

  

The result of a SELECT statement can contain duplicate rows.

  

  

  

MySQL runs on which operating systems?

  

  

  

  

Can joins be nested?

  

  

Which statement is used to access an existing Database?

  

  

  

  

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

  

  

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

  

  

  

  

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

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

Can DISTINCT command be used for more than one column?

  

  

Which of the following is not a MySQL Operator?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

A SELECT command without a WHERE clause returns?

  

  

  

  

If you want to undo a GRANT, you should use

  

  

  

  

  

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

  

  

  

A table may be joined to itself.

  

  

  

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

  

  

  

  

MySQL is

  

  

  

  

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

  

  

  

  

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

  

  

  

  

How many TRIGGERS are allowed in MySql table?

  

  

  

  

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

  

  

  

  

  

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.

  

  

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

  

  

  

  

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

  

  

  

  

You are required to buy a license for MySQL if

  

  

  

  

  

MySQL Access security is controlled through?

  

  

  

  

The "father" of MySQL is

  

  

  

  

MySql | Which of the following is available in MySQL:

  

  

  

  

  

Which of the following is NOT supported by MySQL

  

  

  

  

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

  

  

  

  

Commands passed to the MySQL daemon are written in.

  

  

  

  

The “Mysql command line tool” formats are bounded by

  

  

  

  

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

  

  

  

  

Enum values are stored according to their index numbers

  

  

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 field types would be best to hold a .jpg image?

  

  

  

  

How is structure of a table got in MySQL?

  

  

  

  

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

  

  

  

  

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

  

  

What is DCL?

  

  

  

  

How much character are allowed to create database name?

  

  

  

  

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  

  

  

  

  

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

  

  

  

  

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

  

  

  

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?

  

  

  

  

MySQL comes with as standard with client libraries for:

  

  

  

  

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

  

  

  

  

What is Row?

  

  

  

  

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

  

  

  

  

A user with RELOAD priveliges can

  

  

  

  

What is DDL?

  

  

  

  

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

  

  

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

  

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Which of the following is not a valid aggregate function?

  

  

  

  

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

  

  

  

  

USE keyword is used to select a ___________

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Can I call a trigger directly called from an application?

  

  

Which SQL statement is used to return only different values?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

Where is metadata stored in MySQL?

  

  

  

  

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

  

  

  

  

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

  

  

  

  

  

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

  

  

  

  

Can I define multiple unique constraints on a table?

  

  

Transactions are used to treat sets of SQL statements atomically.

  

  

Which of these is not a valid name for a column

  

  

  

  

What does SQL stand for?

  

  

  

  

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

  

  

  

What is DML?

  

  

  

  

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

  

  

  

Which of the following is not an SQL aggregate function?

  

  

  

  

  

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

  

  

  

  

What is Column?

  

  

  

  

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

  

  

  

  

  

Which of the following is not a character manipulation function?

  

  

  

  

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.