SQL Data Types and Schemas

Question 1
Marks : +2 | -2
Pass Ratio : 100%
Which of the following is not a valid Date and Time data type?
date
time
datestamp
timestamp
Explanation:
datestamp is not a valid Date and Time data type. Timestamp exists but datestamp does not exist in SQL.
Question 2
Marks : +2 | -2
Pass Ratio : 100%
What is a default value?
It is a value that automatically creates a primary key
It is a value that cannot be altered during insertion of values in the tuple
It is a value that is initially loaded into the attribute
None of the mentioned
Explanation:
A default value is a value that is initially loaded into the attribute. All the tuples have the default value in the attribute for which it is specified in case any value is not externally specified.
Question 3
Marks : +2 | -2
Pass Ratio : 100%
revoke select on takes from amit;
It revokes all authorizations from amit
It revokes select authorization from amit
It revokes takes authorization from amit
It gives an error
Explanation:
The query mentions the revoking of the select privilege. So, the query revokes the select authorization from amit.
Question 4
Marks : +2 | -2
Pass Ratio : 100%
What does p indicate in the following data type?
The amount of delay that needs to be added to the time
The number of fractional digits for the seconds
The maximum number of allowed hours
None of the mentioned
Explanation:
The p in the parentheses indicates the number of fractional digits for seconds.
Question 5
Marks : +2 | -2
Pass Ratio : 100%
What is a timestamp?
A combination of date and time with date first
A combination of date and time with time first
A combination of time and place with time first
A combination of time and place with place first
Explanation:
A timestamp is a combination of date and time with date first.
Question 6
Marks : +2 | -2
Pass Ratio : 100%
What does the following statement do?
It creates a new relation temp_inst with all the tuples and attributes of the institute relation
It creates a new relation temp_inst with the same schema as that of the institute relation
It creates a new relation named temp_inst with institute as its only attribute
It does not create any relations and returns an error
Explanation:
The create table like statement creates a new relation which has a schema identical to that of the specified relation after the like keyword.
Question 7
Marks : +2 | -2
Pass Ratio : 100%
Which of the following is an illegal data type in SQL
number
clob
blob
lint
Explanation:
clob and blob are called large object data types. They can be used to store values that can go to the size of gigabytes. Number is used to store the basic integer data type.
Question 8
Marks : +2 | -2
Pass Ratio : 100%
State true or false: Users can define new data types in SQL
True
False
Explanation:
SQL allows the creation of new data types using the “create type as final;” statement.
Question 9
Marks : +2 | -2
Pass Ratio : 100%
Which of the following is a privilege in SQL standard?
select
insert
update
All of the mentioned
Explanation:
The SQL standard includes the privileges select, insert, update and delete. This privilege set can be granted or revoked among the users.
Question 10
Marks : +2 | -2
Pass Ratio : 100%
The _________ statement is used in SQL to confer authorization.
grant
confer
implement
permit
Explanation:
The grant statement is used in SQL to confer authorization. It has the syntax