SQL MCQ - SQL Data Type

11. Choose a data type to store weight of a person in kilograms with accuracy of 1 gram. As per wikipedia, Jon Brower Minnoch was the heaviest human ever recorded with a weight of 635kg.

A. NUMBER(3,3)
B. NUMBER(3,2)
C. NUMBER(6,2)
D. NUMBER(6,3)

View Answer

12. Which of the following statements are TRUE?

A. Scale denotes number of digits allowed after decimal point
B. SQL performs rounding if user attempts to store a value that has higher scale than the data type
C. Both A and B
D. None of the above

View Answer

13.  This set of Database Questions & Answers focuses on SQL Data Types and Schemas Dates must be specified in the format

A. mm/dd/yy
B. yyyy/mm/dd
C. dd/mm/yy
D. yy/dd/mm

View Answer

14. Values of one type can be converted to another domain using which of the following ?

A. Cast
B. Drop type
C. Alter type
D. Convert

View Answer

15. Choose the most suitable data type in case multiple data types are possible for the column. Column Name: Gender ; Description: A single character; gender code, M or F Example: M

A. CHAR(11)
C. CHAR(1)

View Answer

16. Many current-generation database applications need to store photographs, or of the order megabytes and gigabytes using

A. Large-index type
B. Large-object type
C. Large-location type
D. Large-locator type

View Answer

17. Current date is returned by the method

A. system.date
B. current.date
C. machine.date
D. today.date

View Answer

18. Data types in SQL Server are organized into how many categories?

A. 6
B. 7
C. 8
D. 9

View Answer

19. You want to track date and time of the last write access per row?

A. Add TIMESTAMP column to the table
B. Add a DATETIME column to the table and assign getdate() as the default value
C. Add a DATETIME column to the table and write a trigger that sets its value
D. Add a UNIQUEIDENTIFIER column to the table and use it with SQL Server's built-in functions

View Answer

20. In case of SQL Server 2005, binary data type can hold:

A. Fixed-length binary data with a maximum of 6000 bytes.
B. Fixed-length binary data with a maximum of 3000 bytes.
C. Fixed-length binary data with a maximum of 1024 bytes.
D. Fixed-length binary data with a maximum of 8000 bytes.

View Answer

Also check :


* You must be logged in to add comment.