MySQL Questions and Answers – Enabling or Disabling LOCAL Capability for LOAD DATA

This set of MySQL Questions and Answers for Campus interviews focuses on “Enabling or Disabling LOCAL Capability for LOAD DATA”.

1. The LOCAL capability for LOAD DATA does not need to be enabled explicitly.
a) True
b) False
View Answer

Answer: a
Explanation: The ‘LOCAL’ capability for the ‘LOAD DATA’ statement does not need to be enabled explicitly. It can be controlled at build time and at runtime. This can be achieved in two ways.

2. The LOCAL capability for client library is enabled by ______________
a) –enabled-local-file
b) –enable-local-infile
c) –enable-global-file
d) –enable-local-file
View Answer

Answer: b
Explanation: At build time LOCAL capability for the client library can be enabled or disabled by default. The ‘–enable-local-infile’ or ‘–disable-local-infile’ option is used when running configure.

3. What is the most important configurable resource for MyISAM?
a) key cache
b) memory cache
c) time cache
d) speed cache
View Answer

Answer: a
Explanation: For the index processing, ‘MyISAM’ manages its own key cache, which is the most important configurable resource for the MyISAM storage engine. It is used for index based retrievals and sorts.
advertisement
advertisement

4. How many options can be used to control LOCAL capability at runtime?
a) 0
b) 1
c) 2
d) 3
View Answer

Answer: c
Explanation: At runtime, the server can be started with the ‘–local-infile’ or ‘–skip-local-infile’ options to enable or disable ‘LOCAL’ capability on the server side. It can be enabled at build time too.

5. A multiple-table delete cannot apply any join.
a) True
b) False
View Answer

Answer: b
Explanation: In MySQL, a multiple table ‘DELETE’ operation can be performed on the tables combined using any kind of ‘JOIN’ operation. The syntax also allows for deleting rows from multiple tables at once.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. abc in the following MySQL statement is ___________

DELETE FROM xyz WHERE abc = 5;

a) column name
b) table name
c) row name
d) database name
View Answer

Answer: a
Explanation: Here, the operation that is being performed in the statement is the ‘DELETE’ operation. The table name is ‘xyz’ and column name is ‘abc’. The rows having abc value equal to 5 get deleted.
advertisement

7. ‘x’ in the following MySQL statement is ____________

advertisement
DELETE FROM x USING x LEFT JOIN y ON x.col = y.col;

a) column name
b) table name
c) server name
d) database name
View Answer

Answer: b
Explanation: The ‘DELETE’ operation is being performed in the statement. The table names are ‘x’ and ‘y’. The column name is ‘col’. The rows from left join of x and y get deleted according to the condition given.

8. The mode used to turn off the special meaning of backslash and treat it as an ordinary character is _____________
a) NO_ESCAPES_SLASH
b) NO_ESCAPES_BACKSLASH
c) NO_BACKSLASH_ESCAPES
d) NO_BACKSLASH_ESCAPE
View Answer

Answer: c
Explanation: To turn off the special meaning of backslash in MySQL, and treat it as an ordinary character, the SQL mode named NO_BACKSLASH_ESCAPES is enabled. The escape sequence is treated as characters.

9. What is x’ffff’ in decimal?
a) 65534
b) 66535
c) 65536
d) 65537
View Answer

Answer: c
Explanation: In MySQL, string values are specified using the standard SQL notation x’val’. Here, val is pairs of hexadecimal digits (‘0’ through ‘ 9 ’ and ‘ a ’ through ‘ f ’). x’ffff’ is 65536 in decimal.

10. What are X’61626364′ and X’61626364′?
a) abcd and 1633837924
b) abcd and 4297383361
c) dcba and 1633837924
d) dcba and 4297383361
View Answer

Answer: a
Explanation: In the numeric contexts, each hexadecimal number constant is treated as a number. Without adding a zero to it, a hexadecimal literal is treated as a string. Hence it is displayed as abcd.

Sanfoundry Global Education & Learning Series – MySQL Database.

To practice all areas of MySQL for Campus Interviews, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.