Home
MCQS
SQL MCQ Quiz Hub
SQL MCQ SET 17
Choose a topic to test your knowledge and improve your SQL skills
1. Which authentications are required for login into Mysql command line tool?
Username
Password
Only Username
Both Username and Password
2. Mysql command line tool is used to show “how many rows are returned and how long SQL command took to execute”.
TRUE
FALSE
Undetermined
Depend
3. Which command is used for showing current date and time in Mysql command line tool?
select now()
SELECT now();
SELECT now()
None of the mentioned
4. Which among the following is the correct syntax for creating table?
CREATE TABLE name;
CREATE name;
CREATE TABLE
All of the mentioned
5. What is the role of “CONSTRAINS” in defining a table in Mysql?
Declaring primary key
Declaring Foreign Key
Restrictions on columns
All of the mentioned
6. Which command is used for the table definition in Mysql?
DESC table_name;
DESC table_name
DESC
None of the mentioned
7. Which among the following is the correct syntax for defining “Constraint Check” in Mysql?
gender char(1) check( gender IN (‘M’, ‘F’)),
gender char (1) check,
gender char (1) check ( gender ),
none of the mentioned
8. Which data type character merges the “Check Constraint” into a data type definition?
ENUM
ENUM1
ENUM2
None of the mentioned
9. Which among the following is the correct syntax for defining “ENUM” in Mysql?
gender ENUM (‘M’, ‘F’),
gender ENUM,
gender ENUM ( ),
none of the mentioned
10. Which among the following are the correct definitions for “NULL” in Mysql?
Absence of value
Unknown
Empty set
All of the mentioned
11. What is the meaning of “REFERENCES” in table definition?
Primary key
NULL
Foreign Key
A ”foreign Key” belong to this particular table
12. What default value gets stored in columns of the table?
NULL
0
1
-1
13. Which Statement is used to insert the values in the table?
INSERT INTO
Insert
INSERT
None of the mentioned
14. Is it necessary to insert the value in each column of the table?
Yes
No
Depends on the server
Depends on the usage of the table
15. In the following SQL query, what does “person” stands for?
Composite attributes
Multivalued attributes
Table name
None of the mentioned
16. Which statement can be used for modifying the definition for an existing table?
ALTER
Modified
SELECT
FROM
17. Which feature is used for the automatic increment of the column?
AUTO_INCREMENT
AUTO
INCREMENT
All of the mentioned
18. Which among the following is the correct syntax for modifying the definition of an existing table?
ALTER TABLE person MODIFY person_id SMALLINT UNSIGNED AUTO_INCREMENT;
ALTER TABLE person person_id SMALLINT UNSIGNED AUTO_INCREMENT;
ALTER TABLE person MODIFY person_id ;
ALTER TABLE person
19. What is the default value of column?
NULL
0
-1
Undefined
20. Which statement is used to select columns and rows from the table?
SELECT
ALTER
MODIFY
FROM
21. Which Clause is used to select a particular row from the set of row in an existing table?
WHERE
FROM
ALTER
None of the mentioned
22. Which Clause is used to sort the stored data in alphabetical order?
ORDER by CLAUSE
MODIFY
ALTER
UPDATE
23. Which Clause is used to select a particular table in Mysql?
WHERE
SELECT
FROM
ALTER
24. Which command is used to show all tables that are stored in a database?
SHOWS
SHOW
SHOWES
None of the mentioned
25. Which among the following is the correct syntax for showing all tables in the database?
SHOWS TABLES
SHOW TABLE
SHOW
SHOWS TABLES;
26. Which statement is used for updating existing information in the table?
UPDATE
WHERE
MODIFY
ALTER
27. Which statement is used to delete an existing row from the table?
DELETE
WHERE
MODIFY
None of the mentioned
28. “INSERT” is same as “UPDATE”?
NO
YES
May be
None of the mentioned
29. Which clause is used to rename the existing table?
RENAME
MODIFY
ALTER
None of the mentioned
30. Which of the following functions are not performed by “ALTER” clause?
Change the name of the table
Change the name of the column
Drop a column
All of the mentioned
31. Numbers prefixed with ‘0x’ are in base __________
8
16
32
64
32. The mantissa in -1.58E5 is __________
-1.58
1.58
E
5
33. The BIGINT precision is of bit _________
32
64
128
16
34. The DECIMAL used for expressions containing only exact values with fractional part is of digit precision _________
32
64
65
16
35. If a string is to be converted to a number, it is converted into a _____________
double precision floating point
single precision floating point
decimal integer
hexadecimal integer
36. The bit-field values are prefixed with __________
0b
0bit
bit-
‘bit’
37. ‘2341’ is a ____________
integer
floating point
hexadecimal
string
38. If ANSI_QUOTES is enabled, MySQL treats the double quotes as ________________
identifier-quoting character
string-quoting character
hexadecimal
string
39. The escape sequence for carriage return is ___________
‘c’
‘ ’
‘’
‘z’
40. Which mode is used to turn off the special meaning of backslash and treat it as an ordinary character?
NO_ESCAPES_SLASH
NO_ESCAPES_BACKSLASH
NO_BACKSLASH_ESCAPES
NO_BACKSLASH_ESCAPE
41. x’ffff’ in decimal is ___
65534
66535
65536
65537
42. X’61626364′ and X’61626364′ are respectively ______
abcd and 1633837924
abcd and 4297383361
dcba and 1633837924
dcba and 4297383361
43. The number of legal hexadecimal values among 0x0a, 0x0A, 0X0a and 0X0A is _________
1
2
3
4
44. What is used to produce a new string from an old string in the desired character set?
Introducers
CONVERT()
CONVERTER()
CONVERTS()
45. To measure the length of a string in bytes, the operator used is __________
CHAR_LENGTH()
LENGTH()
LEN()
SIZE()
46. Which character set variable indicates the character set used for storing identifiers?
character_set_system
character_set_server
collation_server
character_set_database
47. Character data can be stored as ______________
Fixed length string
Variable length string
Either Fixed or Variable length string
None of the mentioned
48. Which declaration represents that “character data will consume the same number of bytes as declared and is right padded”?
Char
Varchar
Both Char and Varchar
None of the mentioned
49. Which declaration doesn't use the same number of bytes and consumption of bytes depends on the input data?
Varchar
Char
Both Varchar and Char
None of the mentioned
50. The maximum length of the char columns is ____________
255 bytes
65, 535 bytes
256 bytes
None of the mentioned
Submit