The document contains 25 multiple choice questions about MySQL. Some key points covered are:
- The "father" of MySQL is Michael Widenius.
- MySQL supports master-slave replication.
- The USE command is used to choose the database you want to use once connected to MySQL.
- DISTINCT is used to remove duplicate rows from a SELECT result set.
- ALTER TABLE is used to add a new column to an existing table.
- DROP TABLE is used to delete an entire MySQL table.
The document contains 25 multiple choice questions about MySQL. Some key points covered are:
- The "father" of MySQL is Michael Widenius.
- MySQL supports master-slave replication.
- The USE command is used to choose the database you want to use once connected to MySQL.
- DISTINCT is used to remove duplicate rows from a SELECT result set.
- ALTER TABLE is used to add a new column to an existing table.
- DROP TABLE is used to delete an entire MySQL table.
Michael Widenius Bill Joy Stephanie Wall Sigmund Velin 2. What kind of replication is supported by the MySQL server? Multiple-master replication Master to slave replication Single file based clustering MySQL doesn’t support replication 3. Internally information is held in tables. Which of these is NOT a valid format: BDB Isam99 MyIsam InnoDb 4. MySQL supports the complete SQL99 standard True False 5. In a LIKE clause, you can could ask for any value ending in “ton” by writing LIKE ton$ LIKE ^.*ton$ LIKE %ton LIKE *ton 6. The USE command Is a pseudonym for the SELECT command Has been deprecated and should be avoided for security reasons Should be used to choose the database you want to use once you’ve connected to MySQL Is used to load code from another file 7. MySQL Access security is controlled through MySQL login accounts, and privileges set for each account. The ID that the user logged into the server through, and privileges set up for that account. A table of valid IP addresses, and privileges set up for each IP address The normal login security is sufficient for MySQL, and it does not have any extra controls of its own. 8. If you want to undo a GRANT, you should use REVOKE UNDO UNGRANT DELETE 9. How many distinct, different values can you hold in an enum field? 255 7 65535 2 (True and False) 10. Which of the following is NOT available in MySQL: REVOKE FETCH LIKE SELECT 11. Which of these field types would be best to hold a .jpg image? char binary nchar binary text blob 12. What’s the difference between the DESCRIBE and SHOW FIELDS FROM commands? Only SHOW FIELDS FROM can take a LIKE clause Nothing – they’re the same thing Only DESCRIBE can take a LIKE clause 13. Which of the following is available in MySQL: CREATE TRIGGER CREATE SCHEMA CREATE DATABASE CREATE VIEW 14. To remove duplicate rows from the result set of a SELECT use the following keyword: NO DUPLICATE UNIQUE DISTINCT None of the above 15. How much character are allowed to create database name? 55 72 64 40 16. In a SELECT query with a GROUP BY clause, a WHERE clause, and a HAVING clause, the WHERE conditions are applied before the HAVING conditions. True False Either True or False None of the above 17. Which command returns current version on MySQL? SELECT MySQLVERSION(); SELECT VERSION(“MySQL”); SELECT VERSION(); All the above 18. Which clause is used to sort the result of SELECT statement? SORT BY ORDER BY ARRENGE BY None of the above 19. Which data types are treaded as arrays Integer Float String Booleans 20. In order to add a new column to an existing table in SQL, we can use the command MODIFY TABLE EDIT TABLE ALTER TABLE ALTER COLUMNS 21. Which of the following ways below are the correct way to get the current date? SELECT CURTIME(); SELECT CURDATE(); SELECT CURRRENT_TIME() All of the above. 22. Which of the following is used to delete an entire MYSQL database? mysql_drop_database mysql_drop_entiredb mysql_drop_db mysql_drop_dbase 23. In a LIKE clause, you can ask for any 6 letter value by writing: LIKE?????? LIKE .{6} LIKE ^.{6}$ LIKE ______ (that’s six underscore characters) 24. Which of these is a valid call to a function (watch the spaces carefully!) CONCAT( A , B ) CONCAT( “A” , “B” ) CONCAT ( “A” + “B” ) CONCAT (A, B) 25. Which of these commands will delete a table called TEST if you have appropriate authority: DROP TEST DELETE TEST WHERE confirm = “YES” DROP TEST WHERE confirm = “YES” DROP TABLE TEST