SQL/SQL MCQ SET 14 Sample Test,Sample questions

Question:
“Numeric Data” is used to store ____________

1.Whole numbers

2.Natural numbers

3.Rational numbers

4.Both Whole and Natural numbers


Question:
For which type are illegal values converted to the appropriate ‘zero’ value?

1.Numeric

2.String

3.ENUM

4.TIME


Question:
In a MyISAM table, if the maximum value of an AUTO_INCREMENT increment column is 12 and that row is deleted, the next value generated is _____________

1.12

2.13

3.1

4.14


Question:
In MyISAM tables, when a table is emptied with the TRUNCATE TABLE, the counter begins at _____________

1.0

2.1

3.-1

4.arbitrary


Question:
In oracle database variable length column is declared by ____________

1.Varchar

2.Varchar 3

3.Varchar2

4.None of the mentioned


Question:
Is “Datetime” and “Timestamp” are same data type?

1.Yes

2.No

3.Depends

4.None of the mentioned


Question:
Mysql support different character sets, which command is used to display all character sets?

1.SHOW CHARACTER SET;

2.SHOW;

3.CHARACTER SET;

4.None of the mentioned


Question:
Suppose the last row has the AUTO_INCREMENT column value 32. Suppose a new row is added by setting AUTO_INCREMENT value equal to 100. The next row added will have value _____________

1.32

2.33

3.100

4.101


Question:
The AUTO_INCREMENT sequences normally begin at __________

1.0

2.1

3.-1

4.2


Question:
The datatype for single precision floating point number is ____________

1.FLOAT

2.DOUBLE

3.INT

4.BIGINT


Question:
The datatype INT stores ___________

1.16 bit

2.32 bit

3.48 bit

4.64 bit


Question:
The datatype SMALLINT stores ___________

1.16 bit

2.32 bit

3.48 bit

4.8 bit


Question:
The maximum length of the varchar columns is ____________

1.Upto 65, 535 bytes

2.Upto 256 bytes

3.Upto 65, 567 bytes

4.None of the mentioned


Question:
The maximum number of elements allowed in SET() is ___________

1.16

2.32

3.64

4.128


Question:
The maximum size in bytes of a row in MySQL is __________

1.65534

2.65535

3.65536

4.65537


Question:
The number of rows in the table is 10. Suppose all rows are deleted. The new row starts with sequence number ____________

1.11

2.1

3.100

4.101


Question:
The REAL type is synonym for ___________

1.FLOAT

2.INT

3.DOUBLE

4.BIT


Question:
The SQL mode to check for divide by zero error is ________________

1.STRICT_ALL_TABLES

2.ERROR_FOR_DIVISION_BY_ZERO

3.ERROR_DIVIDE_BY_ZERO

4.ERROR_WHEN_DIVIDE_BY_ZERO


Question:
The storage size in bytes required for the MEDIUMINT datatype is ___________

1.1

2.2

3.3

4.4


Question:
The storage size in bytes required for the MEDIUMINT datatype is ___________

1.1

2.2

3.3

4.variable


Question:
The value of recently generated sequence number can be obtained by ____________

1.LAST_INSERT_ID()

2.LATEST_INSERT_ID()

3.INITIAL_INSERT_ID()

4.INSERT_ID()


Question:
What is the command to see the warning messages?

1.DISPLAY WARNINGS

2.DISP WARNINGS

3.DISP WARNING

4.SHOW WARNINGS


Question:
What is the default format for “Date” data type?

1.YYYY-MM-DD

2.MM-YYYY-DD

3.DD-MM-YYYY

4.None of the mentioned


Question:
What is the default format for “Datetime” data type?

1.YYYY-MM-DD HH:MI:SS

2.MM-YYYY-DD HH:MI:SS

3.DD-YYYY-MM MI:HH:SS

4.None of the mentioned


Question:
What is the default format for “Time” data type?

1.HHH:MI:SS

2.SS:MI:HHH

3.MI:SS:HHH

4.None of the mentioned


Question:
What is the default format for “Timestamp” data type?

1.YYYY-MM-DD HH:MI:SS

2.MM-YYYY-DD HH:MI:SS

3.DD-YYYY-MM MI:HH:SS

4.None of the mentioned


Question:
What is the default format for “Year” data type?

1.YYYY

2.YYYY-DD-MM

3.MM-YYYY-DD

4.None of the mentioned


Question:
What will be the storage pattern for “float(4,2)” in Mysql?

1.Total of four digits, two to the left of decimal and two to the right of decimal

2.Total of six digits

3.Total of four digits, not distributed uniformly

4.None of the mentioned


Question:
What will happen if the data being loaded into a text column exceeds the maximum size of that type?

1.Extra memory will be allocated

2.Process terminate

3.Data will be truncated

4.Depend on the system


Question:
When no AUTO_INCREMENT value has been generated during the current connection, LAST_INSERT_ID() returns ____________

1.-1

2.0

3.1

4.2


Question:
Which among the following are the correct representation of “float(4,2)”?

1.24.33

2.124.4

3.12.123

4.Both 24.33 and 124.4


Question:
Which among the following have the maximum bytes?

1.Varchar

2.Char

3.Text type

4.Both Varchar and Char


Question:
Which among the following is the correct representation of “float(1,1)”?

1.Total of 1 digit

2.Total of 2 digit

3.Total of 2 digit, one digit at right of the decimal, one digit at left of the decimal

4.None of the mentioned


Question:
Which among the following is the correct representation of “float(5,0)”?

1.12345.123

2.12345.1

3.12345

4.123.123


Question:
Which “text type” has the maximum number of bytes?

1.Tiny text

2.Text

3.Medium text

4.Long text


Question:
Which column attribute provides unique numbers for identification?

1.AUTO_INCREMENT

2.UNSIGNED

3.IDENTIFY

4.DESCRIBE


Question:
Which data and time datatype stores time value in ‘hh:mm:ss’ format?

1.DATE

2.TIME

3.DATETIME

4.TIMESTAMP


Question:
Which data type is more suitable for storing “documents” in Mysql?

1.Varchar

2.Longtext

3.Mediumtext

4.Either Varchar or Longtext


Question:
Which data type is more suitable for storing “small notes” in Mysql?

1.Char

2.Varchar

3.Mediumtext

4.Longtext


Question:
Which data type is used to store data and time in Mysql?

1.Numeric data type

2.Text data type

3.Temporal data type

4.Char/Varchar


Question:
Which datatype is used for a fixed length binary string?

1.VARCHAR

2.BINARY

3.VARBINARY

4.BLOB


Question:
Which datatype means a variable length non binary string?

1.VARCHAR

2.BINARY

3.VARBINARY

4.BLOB


Question:
Which keyword suppresses errors?

1.SUPPRESS

2.STOP

3.PREVENT

4.IGNORE


Question:
Which mode is a shorthand for ‘both strict modes plus a bunch of other restrictions’?

1.STRICT_ALL_TABLES

2.STRICT_TRANS_TABLES

3.TRADITIONAL

4.ERROR_WHEN_DIVIDE_BY_ZERO


Question:
Which mode is used to turn on strict mode and all of the additional restrictions?

1.STRICT_ALL_TABLES

2.ERROR_FOR_DIVISION_BY_ZERO

3.TRADITIONAL

4.ERROR_WHEN_DIVIDE_BY_ZERO


Question:
Which mode prevents entry of the ‘zero’ date value in strict mode?

1.SUPPRESS

2.NO_ZERO_DATE

3.PREVENT

4.NO_ZERO_IN_DATE


Question:
Which mode prevents MySQL to perform full checking of date parts?

1.ALLOW_DATES_INVALID

2.ALLOW_INVALID_DATES

3.PREVENT_DATE_CHECK

4.STOP_DATES_CHECK


Question:
Which Numeric Data type has the largest range?

1.Mediumint

2.Smallint

3.Int

4.Tinyint


Question:
Which one is the correct declaration for choosing the character set other than default?

1.Varchar(20) character set utf8;

2.Varchar(20);

3.Varchar(20) character set;

4.None of the mentioned


Question:
Which spatial datatype is used to store a curve?

1.GEOMETRY

2.POINT

3.LINESTRING

4.POLYGON


Question:
Which value will show an error when stored in float(4,2)?

1.12.11

2.13.1

3.1.12

4.123.44


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!