MCQs 1
MCQs 1
Oracle
MySQL
Heidi
SQL
All of the above
18. What command is used to create a new table in SQL?
a.CREATE TABLE
b. BUILD TABLE
c. GENERATE TABLE
d. None of the above
19. What does the following statement in SQL do?
DROP TABLE student;
a.Deletes a table called student.
b.Creates a table called student.
c.Check if there is a table called student.
d.None of the above.
20. Which of the following are types of Unicode character string types in SQL?
● nchar
● ntext
● Both A and B
● None of the above
21.What does BLOB in SQL stand for?
● Binary Large Objects
● Big Large Objects
● Binary Language for Objects
● None of the above
22. Which of the following datatype is most appropriate for storing a string of up to 255 characters?
● TEXT
● TINY TEXT
● BLOB
● BINARY
23. What happens when no value is inserted in an ENUM list?
● Nothing happens
● The code will crash
● A blank value is inserted in that case
● None of the above
24. What is the range of integers that can be held in the MEDIUMINT datatype of SQL?
● Signed numbers in the range of -8388608 to 8388607.
● Unsigned numbers in the range of 0 to 16777215.
● Both A and B.
● None of the above.
25.What does the following code snippet do?
ALTER TABLE STUDENT ADD(ADDRESS VARCHAR2(20));
● Adds a column called ADDRESS in the table student.
● Checks if a column called ADDRESS is present in the table student.
● Invalid Syntax
● None of the above
46 Which of the following operators is used to compare a value to a list of literal values that have been specified?
ANY
BETWEEN
IN
ALL
Show Explanation
48 Which of the following constraints can be defined only at the column level?
UNIQUE
NOT NULL
CHECK
PRIMARY KEY
Show Explanation
52 Which of the following functions do we use to get a specified day of the month for a given date?
DAY
DATEPART
GETDATE
CURRENT_TIMESTAMP
Show Explanation
56 How can the user change “Scaler” into “Interviewbit” in the “Name” column in the Users table?
UPDATE User SET Name = 'Scaler' INTO Name = 'Interviewbit'
MODIFY Users SET Name = 'Interviewbit' WHERE Name = 'Scaler'
MODIFY Users SET Name = 'Scaler' INTO Name = 'Interviewbit'
UPDATE Users SET Name = 'Interviewbit' WHERE Name = 'Scaler'
Show Explanation