Mysql/MY SQL Basic Sample Test Sample Test,Sample questions

adplus-dvertising

Question:
A command that lets you change one or more fields in a record is

1.Insert

2.Modify

3.Look-up

4.All of the above

Posted Date:-2022-01-08 04:00:14


Question:
According to the SQL-92 standard the asterisk (*) means in Select statements 

1.all columns of the table are to be returned

2.all records meeting the full criteria are to be returned

3. all records with even partial criteria met are to be returned

4.None

Posted Date:-2022-01-08 04:00:14


Question:
Choose  not a type of SQL constraint?

1.PRIMARY

2.UNIQUE

3.ALTERNATE

4.FOREIGN

Posted Date:-2022-01-08 04:00:14


Question:
Choose following behavior as an SQL virtual table?

1.view

2.relation

3.Query

4.Query results

Posted Date:-2022-01-08 04:00:14


Question:
Command makes the updates performed by the transaction permanent in the database?

1.COMMIT

2.ROLLBACK

3.TRUNCATE

4.DELETE

Posted Date:-2022-01-08 04:00:14


Question:
Find all the user whose id is 10

1.SELECT * FROM user WHERE id= 10;

2.SELECT * FROM WHERE id= 10;

3.SELECT * FROM user.id= 10;

4.None

Posted Date:-2022-01-08 04:00:14


Question:
Find the temperature in increasing order of all cities

1.SELECT city FROM weather ORDER BY temperature

2.SELECT city, temperature FROM weather

3.SELECT city, temperature FROM weather ORDER BY temperature

4.SELECT city, temperature FROM weather ORDER BY city

Posted Date:-2022-01-08 04:00:14


Question:
How to select all data from student table starting the name from letter a?

1.%a%

2.a%

3._a&

4.None

Posted Date:-2022-01-08 04:00:14


Question:
´╗┐Which of the following SQL query can be used to insert new recorder to a database table?

1.add row

2.ADD

3.APPEND

4.INSERT

Posted Date:-2022-01-08 04:00:14


Question:
Keyword is used to sort ?

1.SORT BY

2.ORDER BY

3.ORDER

4.SORT

Posted Date:-2022-01-08 04:00:14


Question:
SQL can be used to

1.create database structures

2.query database data

3.modify database data

4.All of the above

Posted Date:-2022-01-08 04:00:14


Question:
sub-query in an SQL SELECT statement is enclosed in

1.brackets -- [...]

2.parenthesis -- (...)

3.CAPITAL LETTERS

4.braces -- {...}

Posted Date:-2022-01-08 04:00:14


Question:
The command to delete a table from a database 

1.DROP TABLE tablename ;

2.DELETE TABLE tablename ;

3.REMOVE TABLE tablename ;

4.UPDATE TABLE tablename ;

Posted Date:-2022-01-08 04:00:14


Question:
The FROM SQL clause is used to.

1.specify what table we are selecting or deleting data FROM

2.specify range for search condition

3.specify search condition

4.None of these

Posted Date:-2022-01-08 04:00:14


Question:
The HAVING clause does which of the following?

1.Acts EXACTLY like a WHERE clause

2.Acts like a WHERE clause but is used for columns rather than groups

3.Acts like a WHERE clause but is used for groups rather than rows

4.Acts like a WHERE clause but is used for rows rather than columns

Posted Date:-2022-01-08 04:00:14


Question:
The query to remove rows from a table  named user ?

1.DROP FROM user where id =1

2.UPDATE FROM user where id =1

3.REMOVE FROM user where id =1

4.DELETE FROM user where id =1

Posted Date:-2022-01-08 04:00:14


Question:
The result of a SQL SELECT statement is a _______

1.file

2.report

3.table

4.None

Posted Date:-2022-01-08 04:00:14


Question:
The SQL ALTER statement can be used 

1.to change in table data

2.to change in table structure

3. delete rows from the table

4. delete new recored in the table

Posted Date:-2022-01-08 04:00:14


Question:
The SQL keyword BETWEEN is used 

1.to limit the columns displayed

2.for ranges

3.as a wildcard

4.None of these is correct

Posted Date:-2022-01-08 04:00:14


Question:
The SQL keyword(s) ________ is used with wildcards

1.NOT IN only

2.LIKE only

3.IN only

4.IN and NOT IN

Posted Date:-2022-01-08 04:00:14


Question:
The SQL WHERE clause to limits the

1.row data

2.column data

3.Both

4.None

Posted Date:-2022-01-08 04:00:14


Question:
The wildcard in a WHERE clause is useful when?

1.An exact match is necessary in a CREATE statement

2. An exact match is necessary in a SELECT statement

3.An exact match is not possible in a SELECT statement

4.An exact match is not possible in a CREATE statement

Posted Date:-2022-01-08 04:00:14


Question:
undo all the updates performed by the SQL in the transaction?

1.ROLLBACK

2.COMMIT

3.TRUNCATE

4.DELETE

Posted Date:-2022-01-08 04:00:14


Question:
What is the full form of SQL?

1.Structured Query Language

2.Structured Query List

3.Simple Query Language

4.All of the above

Posted Date:-2022-01-08 04:00:14


Question:
What is the meaning of LIKE %0%0%

1. Feature begins with two 0

2.Feature ends with two 0

3.Feature has more than two 0

4.Feature has two 0 in it, at any position

Posted Date:-2022-01-08 04:00:14


Question:
What operator tests column for the absence of data?

1.IS NULL

2.NOT

3.EXISTS

4.All of the above

Posted Date:-2022-01-08 04:00:14


Question:
What SQL query can be used to add columns to a table?

1.ALTER TABLE Table_Name ADD Column_Name

2.Update TABLE TableName ADD COLUMN ColumnName

3.MODIFY TABLE TableName ADD ColumnName

4.MODIFY TABLE TableName ADD COLUMN ColumnName

Posted Date:-2022-01-08 04:00:14


Question:
When three or more AND and OR conditions are combined, it is easier to use the SQL keyword(s)

1.NOT IN only

2.LIKE only

3.IN only

4.Both IN and NOT IN

Posted Date:-2022-01-08 04:00:14


Question:
When using the SQL INSERT statement..

1.rows can be modified according to criteria only.

2.rows cannot be copied in mass from one table to another only.

3.rows can either be inserted into a table one at a time or in groups.

4.rows can be inserted into a table only one at a time only

Posted Date:-2022-01-08 04:00:14


Question:
which command is used to SELECT only one copy of each set of duplicate rows

1.SELECT DISTINCT

2.SELECT UNIQUE

3.SELECT DIFFERENT

4.All of the above

Posted Date:-2022-01-08 04:00:14


Question:
Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables?

1.Data Definition Language(DDL)

2.Data Manipulation Language(DML)

3.Both

4.None of these is correct

Posted Date:-2022-01-08 04:00:14


Question:
Which of the following do you need to consider when you make a table in SQL?

1.Data types

2.Primary keys

3.Default values

4.All of the above

Posted Date:-2022-01-08 04:00:14


Question:
Which of the following group functions ignore NULL values?

1.MAX

2.COUNT

3.SUM

4.All of the above

Posted Date:-2022-01-08 04:00:14


Question:
Which of the following is a SQL aggregate function?

1.AVG

2.LEFT

3.JOIN

4.LEN

Posted Date:-2022-01-08 04:00:14


Question:
which of the following is not a data definition language commands?

1.RENAME

2.GRANT

3.REVOKE

4.UPDATE

Posted Date:-2022-01-08 04:00:14


Question:
Which of the following is the original purpose of SQL?

1.To define the data structures

2.To specify the syntax and semantics of SQL data definition language

3.To specify the syntax and semantics of SQL manipulation language

4.All of the above

Posted Date:-2022-01-08 04:00:14


Question:
Which of the following must be enclosed in double quotes?

1.Column Alias

2.Dates

3.Strings

4.All of the above

Posted Date:-2022-01-08 04:00:14


Question:
Which of the following SQL commands is used to retrieve data?

1.DELETE

2.SELECT

3.INSERT

4.SELECT

Posted Date:-2022-01-08 04:00:14


Question:
Which of the following statement is correct for using comparison operators in SQL?

1.SELECT * FROM user WHERE id>50 and id <80

2.SELECT * FROM user WHERE id>50 and <80

3.SELECT * FROM user WHERE id>50 and where id <80

4.SELECT * FROM user WHERE id>50, where id <80

Posted Date:-2022-01-08 04:00:14


Question:
Which of the SQL statements is correct?

1.SELECT Username AND Password FROM Users

2.SELECT Username, Password FROM Users

3.ELECT Username, Password WHERE Username = user1

4.None of these

Posted Date:-2022-01-08 04:00:14


Question:
Which SQL keyword is used to retrieve a maximum value?

1.TOP

2.MAX

3.UPPER

4.MOST

Posted Date:-2022-01-08 04:00:14


Question:
Which SQL keyword is used to retrieve only unique values?

1.DISTINCTIVE

2.UNIQUE

3.DIFFERENT

4.DISTINCT

Posted Date:-2022-01-08 04:00:14


Question:
Which SQL query can be used to delete columns from a table?

1.update TABLE Table_Name DROP Column_Name

2.MODIFY TABLE Table_Name DROP COLUMN Column_Name

3. ALTER TABLE TableName DROP Column_Name

4.ALTER TABLE TableName DROP COLUMN Column_Name

Posted Date:-2022-01-08 04:00:14


Question:
Which SQL statement is used to delete data FROM a database?

1.REMOVE

2.ALTER

3.DELETE

4.COLLAPSE

Posted Date:-2022-01-08 04:00:14


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

1.SAVE

2.SAVE AS

3.UPDATE

4.MODIFY

Posted Date:-2022-01-08 04:00:14


More MCQS

  1. MY SQL Basic Sample Test
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!