SQL/SQL MCQ SET 17 Sample Test,Sample questions

Question:
‘2341’ is a ____________

1.integer

2.floating point

3.hexadecimal

4.string


Question:
“INSERT” is same as “UPDATE”?

1.NO

2.YES

3.May be

4.None of the mentioned


Question:
Character data can be stored as ______________

1.Fixed length string

2.Variable length string

3.Either Fixed or Variable length string

4.None of the mentioned


Question:
If a string is to be converted to a number, it is converted into a _____________

1.double precision floating point

2.single precision floating point

3.decimal integer

4.hexadecimal integer


Question:
If ANSI_QUOTES is enabled, MySQL treats the double quotes as ________________

1.identifier-quoting character

2.string-quoting character

3.hexadecimal

4.string


Question:
In the following SQL query, what does “person” stands for?

1.Composite attributes

2.Multivalued attributes

3.Table name

4.None of the mentioned


Question:
Is it necessary to insert the value in each column of the table?

1.Yes

2.No

3.Depends on the server

4.Depends on the usage of the table


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

1.TRUE

2.FALSE

3.Undetermined

4.Depend


Question:
Numbers prefixed with ‘0x’ are in base __________

1.8

2.16

3.32

4.64


Question:
The BIGINT precision is of bit _________

1.32

2.64

3.128

4.16


Question:
The bit-field values are prefixed with __________

1.0b

2.0bit

3.bit-

4.‘bit’


Question:
The DECIMAL used for expressions containing only exact values with fractional part is of digit precision _________

1.32

2.64

3.65

4.16


Question:
The escape sequence for carriage return is ___________

1.‘c’

2.‘ ’

3.‘’

4.‘z’


Question:
The mantissa in -1.58E5 is __________

1.-1.58

2.1.58

3.E

4.5


Question:
The maximum length of the char columns is ____________

1.255 bytes

2.65, 535 bytes

3.256 bytes

4.None of the mentioned


Question:
The number of legal hexadecimal values among 0x0a, 0x0A, 0X0a and 0X0A is _________

1.1

2.2

3.3

4.4


Question:
To measure the length of a string in bytes, the operator used is __________

1.CHAR_LENGTH()

2.LENGTH()

3.LEN()

4.SIZE()


Question:
What default value gets stored in columns of the table?

1.NULL

2.0

3.1

4.-1


Question:
What is the default value of column?

1.NULL

2.0

3.-1

4.Undefined


Question:
What is the meaning of “REFERENCES” in table definition?

1.Primary key

2.NULL

3.Foreign Key

4.A ”foreign Key” belong to this particular table


Question:
What is the role of “CONSTRAINS” in defining a table in Mysql?

1.Declaring primary key

2.Declaring Foreign Key

3.Restrictions on columns

4.All of the mentioned


Question:
What is used to produce a new string from an old string in the desired character set?

1.Introducers

2.CONVERT()

3.CONVERTER()

4.CONVERTS()


Question:
Which among the following are the correct definitions for “NULL” in Mysql?

1.Absence of value

2.Unknown

3.Empty set

4.All of the mentioned


Question:
Which among the following is the correct syntax for creating table?

1.CREATE TABLE name;

2.CREATE name;

3.CREATE TABLE

4.All of the mentioned


Question:
Which among the following is the correct syntax for defining “Constraint Check” in Mysql?

1.gender char(1) check( gender IN (‘M’, ‘F’)),

2.gender char (1) check,

3.gender char (1) check ( gender ),

4.none of the mentioned


Question:
Which among the following is the correct syntax for defining “ENUM” in Mysql?

1.gender ENUM (‘M’, ‘F’),

2.gender ENUM,

3.gender ENUM ( ),

4.none of the mentioned


Question:
Which among the following is the correct syntax for modifying the definition of an existing table?

1.ALTER TABLE person MODIFY person_id SMALLINT UNSIGNED AUTO_INCREMENT;

2.ALTER TABLE person person_id SMALLINT UNSIGNED AUTO_INCREMENT;

3.ALTER TABLE person MODIFY person_id ;

4.ALTER TABLE person


Question:
Which among the following is the correct syntax for showing all tables in the database?

1.SHOWS TABLES

2.SHOW TABLE

3.SHOW

4.SHOWS TABLES;


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

1.Username

2.Password

3.Only Username

4.Both Username and Password


Question:
Which character set variable indicates the character set used for storing identifiers?

1.character_set_system

2.character_set_server

3.collation_server

4.character_set_database


Question:
Which clause is used to rename the existing table?

1.RENAME

2.MODIFY

3.ALTER

4.None of the mentioned


Question:
Which Clause is used to select a particular row from the set of row in an existing table?

1.WHERE

2.FROM

3.ALTER

4.None of the mentioned


Question:
Which Clause is used to select a particular table in Mysql?

1.WHERE

2.SELECT

3.FROM

4.ALTER


Question:
Which Clause is used to sort the stored data in alphabetical order?

1.ORDER by CLAUSE

2.MODIFY

3.ALTER

4.UPDATE


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

1.select now()

2.SELECT now();

3.SELECT now()

4.None of the mentioned


Question:
Which command is used for the table definition in Mysql?

1.DESC table_name;

2.DESC table_name

3.DESC

4.None of the mentioned


Question:
Which command is used to show all tables that are stored in a database?

1.SHOWS

2.SHOW

3.SHOWES

4.None of the mentioned


Question:
Which data type character merges the “Check Constraint” into a data type definition?

1.ENUM

2.ENUM1

3.ENUM2

4.None of the mentioned


Question:
Which declaration doesn't use the same number of bytes and consumption of bytes depends on the input data?

1.Varchar

2.Char

3.Both Varchar and Char

4.None of the mentioned


Question:
Which declaration represents that “character data will consume the same number of bytes as declared and is right padded”?

1.Char

2.Varchar

3.Both Char and Varchar

4.None of the mentioned


Question:
Which feature is used for the automatic increment of the column?

1.AUTO_INCREMENT

2.AUTO

3.INCREMENT

4.All of the mentioned


Question:
Which mode is used to turn off the special meaning of backslash and treat it as an ordinary character?

1.NO_ESCAPES_SLASH

2.NO_ESCAPES_BACKSLASH

3.NO_BACKSLASH_ESCAPES

4.NO_BACKSLASH_ESCAPE


Question:
Which of the following functions are not performed by “ALTER” clause?

1.Change the name of the table

2.Change the name of the column

3.Drop a column

4.All of the mentioned


Question:
Which statement can be used for modifying the definition for an existing table?

1.ALTER

2.Modified

3.SELECT

4.FROM


Question:
Which statement is used for updating existing information in the table?

1.UPDATE

2.WHERE

3.MODIFY

4.ALTER


Question:
Which statement is used to delete an existing row from the table?

1.DELETE

2.WHERE

3.MODIFY

4.None of the mentioned


Question:
Which Statement is used to insert the values in the table?

1.INSERT INTO

2.Insert

3.INSERT

4.None of the mentioned


Question:
Which statement is used to select columns and rows from the table?

1.SELECT

2.ALTER

3.MODIFY

4.FROM


Question:
X’61626364′ and X’61626364′ are respectively ______

1.abcd and 1633837924

2.abcd and 4297383361

3.dcba and 1633837924

4.dcba and 4297383361


Question:
x’ffff’ in decimal is ___

1.65534

2.66535

3.65536

4.65537


More MCQS

  1. SQL MCQ SET 1
  2. SQL MCQ SET 2
  3. SQL MCQ SET 3
  4. SQL MCQ SET 4
  5. SQL MCQ SET 5
  6. SQL MCQ SET 6
  7. SQL MCQ SET 7
  8. SQL MCQ SET 8
  9. SQL MCQ SET 9
  10. SQL MCQ SET 10
  11. SQL MCQ SET 11
  12. SQL MCQ SET 12
  13. SQL MCQ SET 13
  14. SQL MCQ SET 14
  15. SQL MCQ SET 15
  16. SQL MCQ SET 16
  17. SQL MCQ SET 17
  18. SQL MCQ SET 18
  19. MCQ | SQL Basics
  20. MCQ | SQL Data Types
  21. SQL Server DBA Multiple Choice Questions
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!