MCQ | SQL – Data Types

SQL Data Types MCQ: This section contains the Multiple-Choice Questions & Answers on SQL Data Types.
Submitted by Anushree Goswami, on August 19, 2021

SQL Data Types MCQs

1. In the database table, data types describe the kind of ___ that it can contain.

  1. Table
  2. Data
  3. Number
  4. None of the above

Answer: B) Data

Explanation:

In the database table, data types describe the kind of Data that they can contain.

Discuss this Question


2. In how many categories data types has been classified?

  1. 2
  2. 3
  3. 4
  4. 5

Answer: B) 3

Explanation:

Data types are classified into 3 categories,

  • String Data types
  • Numeric Data types
  • Date and time Data types

Discuss this Question


3. Name of the data type categories are,

  1. String Data types
  2. Numeric Data types
  3. Date and time Data types
  4. All of the above

Answer: D) All of the above

Explanation:

Data types are classified into 3 categories named as String, numeric, and date and time category.

Discuss this Question


4. Which of the following is not MySQL String Data Type?

  1. TEXT(Size)
  2. TINYTEXT
  3. MEDIUMTEXT
  4. LARGETEXT

Answer: D) LARGETEXT

Explanation:

MySQL String Data Types are TEXT(Size), TINYTEXT, MEDIUMTEXT, and LONGTEXT.

Discuss this Question


5. Which of the following is not MySQL Numeric Data Type?

  1. BIT(Size)
  2. CHAR(Size)
  3. INTEGER(Size)
  4. INT(Size)

Answer: B) CHAR(Size)

Explanation:

MySQL Numeric Data Types are BIT(Size), INT(Size), and INTEGER(Size).

Discuss this Question


6. Which of the following are not MySQL Date and Time Data Type?

  1. DATE
  2. TIME(fsp)
  3. YEAR
  4. None of the above

Answer: D) None of the above

Explanation:

MySQL Date and Time Data Types are DATE, TIME(fsp), and YEAR.

Discuss this Question


7. Which of the following is SQL Server String Data Type?

  1. ntext
  2. binary(n)
  3. varbinary
  4. All of the above

Answer: D) All of the above

Explanation:

SQL Server String Data Types are ntext, binary(n), and varbinary.

Discuss this Question


8. Which of the following is SQL Server Numeric Data Type?

  1. image
  2. nchar
  3. money
  4. cursor

Answer: C) money

Explanation:

money is the SQL Server Numeric Data Type.

Discuss this Question


9. Which of the following is SQL Server Date and Time Data Type?

  1. timestamp
  2. sql_variant
  3. real
  4. text

Answer: a) timestamp

Explanation:

timestamp is SQL Server Date and Time Data Type.

Discuss this Question


10. TINYTEXT can hold the maximum length of ___ characters?

  1. 254
  2. 255
  3. 256
  4. 257

Answer: B) 255

Explanation:

TINYTEXT can hold the maximum length of 255 characters.

Discuss this Question


11. What is the full form of BLOB?

  1. Binary Long Objects
  2. Binary Least Objects
  3. Binary Large Objects
  4. Binary Large Orientation

Answer: C) Binary Large Objects

Explanation:

Full form of BLOB is "Binary Large Objects".

Discuss this Question


12. How MySQL determines which one to use, FLOAT or DOUBLE, using the p parameter?

  1. If p comes between 0 to 25, data type becomes FLOAT(). If p comes between 26 to 54, data type becomes DOUBLE().
  2. If p comes between 26 to 54, data type becomes FLOAT(). If p comes between 0 to 25, data type becomes DOUBLE().
  3. If p comes between 25 to 53, data type becomes FLOAT(). If p comes between 0 to 24, data type becomes DOUBLE().
  4. If p comes between 0 to 24, data type becomes FLOAT(). If p comes between 25 to 53, data type becomes DOUBLE().

Answer: D) If p comes between 0 to 24, data type becomes FLOAT(). If p comes between 25 to 53, data type becomes DOUBLE()

Explanation:

MySQL determines to use FLOAT or DOUBLE using the p parameter. If p comes between 0 to 24, the data type becomes FLOAT(). If p comes between 25 to 53, the data type becomes DOUBLE().

Discuss this Question


13. What does BOOL mean in MySQL Numeric Data Types?

  1. A Boolean value is specified by this variable. When a value is nonzero, it is considered false, and zero is considered true.
  2. A Boolean value is specified by this variable. When a value is nonzero, it is considered true, and zero is considered false.
  3. A Boolean value is specified by this variable. When a value is nonzero, it is considered true, and zero is also considered true.
  4. A Boolean value is specified by this variable. When a value is nonzero, it is considered false, and zero is also considered false.

Answer: B) A Boolean value is specified by this variable. When a value is nonzero, it is considered true, and zero is considered false.

Explanation:

A Boolean value is specified by this variable. When a value is nonzero, it is considered true, and zero is considered false.

Discuss this Question


14. What can be the maximum size of char(n) in SQL Server String Data Type?

  1. 7000
  2. 8000
  3. 9000
  4. 10000

Answer: B) 8000

Explanation:

A maximum of 8000 characters is the size of char(n) in SQL Server String Data Types.

Discuss this Question


15. What is the difference between nchar and nvarchar?

  1. nchar is fixed and nvarchar is variable.
  2. nchar is variable and nvarchar is fixed.
  3. nchar has the maximum size of 4000 characters and nvarchar has the maximum size of 8000 characters.
  4. nchar has the maximum size of 800 characters and nvarchar has the maximum size of 4000 characters.

Answer: A) nchar is fixed and nvarchar is variable.

Explanation:

nchar is fixed and nvarchar is variable width Unicode string data type.

Discuss this Question


16. What is the difference between nvarchar and ntext?

  1. nvarchar is fixed and ntext is variable.
  2. nvarchar is variable and ntext is fixed.
  3. nvarchar can be of the maximum size upto 4000 characters and ntext can be of the maximum size upto 2GB of the text data.
  4. nvarchar can be of the maximum size upto 4000 characters and ntext can be of the maximum size upto 1GB of the text data.

Answer: C) nvarchar can be of the maximum size upto 4000 characters and ntext can be of the maximum size upto 2GB of the text data

Explanation:

nvarchar can be of the maximum size upto 4000 characters and ntext can be of the maximum size upto 2GB of the text data.

Discuss this Question


17. Bit is an integer that can be –

  1. 0
  2. 1
  3. Null
  4. All of the above

Answer: D) All of the above

Explanation:

Bit is an integer that can be 0, 1 or Null.

Discuss this Question


18. What is the full form of GUID?

  1. Guided Unique Identifier
  2. Guided Unique Interpreter
  3. Globally Unique Identifier
  4. Globally Unique Interpreter

Answer: C) Globally Unique Identifier

Explanation:

Full form of GUID is "Globally Unique Identifier".

Discuss this Question


19. What is the similarity between CLOB and NCLOB Oracle Large Object Data Types?

  1. Both CLOB and NCLOB are used for multibyte national character set data.
  2. Both CLOB and NCLOB can range upto 2^32-1 bytes or 4 GB.
  3. Both CLOB and NCLOB can range upto 2^32-1 bytes or 8GB.
  4. Both CLOB and NCLOB are used for singlebyte and multibyte national character set data.

Answer: B) Both CLOB and NCLOB can range upto 2^32-1 bytes or 4 GB

Explanation:

Both CLOB and NCLOB can range upto 2^32-1 bytes or 4 GB.

Discuss this Question


20. What is the difference between VARCHAR and VARCHAR2?

  1. VARCHAR can store upto 4000 bytes and VARCHAR2 can store upto 8000 bytes.
  2. VARCHAR can store upto 2000 bytes and VARCHAR2 can store upto 4000 bytes.
  3. Both VARCHAR and VARCHAR2 are similar but use of VARCHAR2 is mostly recommended.
  4. There is no similarity between VARCHAR and VARCHAR2.

Answer: C) Both VARCHAR and VARCHAR2 are similar but use of VARCHAR2 is mostly recommended

Explanation:

Both VARCHAR and VARCHAR2 are similar but use of VARCHAR2 is mostly recommended.

Discuss this Question





Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.