Home »
SQL »
SQL MCQs
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.
- Table
- Data
- Number
- 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?
- 2
- 3
- 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,
- String Data types
- Numeric Data types
- Date and time Data types
- 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?
- TEXT(Size)
- TINYTEXT
- MEDIUMTEXT
- 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?
- BIT(Size)
- CHAR(Size)
- INTEGER(Size)
- 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?
- DATE
- TIME(fsp)
- YEAR
- 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?
- ntext
- binary(n)
- varbinary
- 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?
- image
- nchar
- money
- 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?
- timestamp
- sql_variant
- real
- 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?
- 254
- 255
- 256
- 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?
- Binary Long Objects
- Binary Least Objects
- Binary Large Objects
- 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?
- If p comes between 0 to 25, data type becomes FLOAT(). If p comes between 26 to 54, data type becomes DOUBLE().
- If p comes between 26 to 54, data type becomes FLOAT(). If p comes between 0 to 25, data type becomes DOUBLE().
- If p comes between 25 to 53, data type becomes FLOAT(). If p comes between 0 to 24, data type becomes DOUBLE().
- 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?
- A Boolean value is specified by this variable. When a value is nonzero, it is considered false, and zero is considered true.
- A Boolean value is specified by this variable. When a value is nonzero, it is considered true, and zero is considered false.
- A Boolean value is specified by this variable. When a value is nonzero, it is considered true, and zero is also considered true.
- 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?
- 7000
- 8000
- 9000
- 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?
- nchar is fixed and nvarchar is variable.
- nchar is variable and nvarchar is fixed.
- nchar has the maximum size of 4000 characters and nvarchar has the maximum size of 8000 characters.
- 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?
- nvarchar is fixed and ntext is variable.
- nvarchar is variable and ntext is fixed.
- nvarchar can be of the maximum size upto 4000 characters and ntext can be of the maximum size upto 2GB of the text data.
- 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 –
- 0
- 1
- Null
- 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?
- Guided Unique Identifier
- Guided Unique Interpreter
- Globally Unique Identifier
- 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?
- Both CLOB and NCLOB are used for multibyte national character set data.
- Both CLOB and NCLOB can range upto 2^32-1 bytes or 4 GB.
- Both CLOB and NCLOB can range upto 2^32-1 bytes or 8GB.
- 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?
- VARCHAR can store upto 4000 bytes and VARCHAR2 can store upto 8000 bytes.
- VARCHAR can store upto 2000 bytes and VARCHAR2 can store upto 4000 bytes.
- Both VARCHAR and VARCHAR2 are similar but use of VARCHAR2 is mostly recommended.
- 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