Note: This Question is unanswered, help us to find answer for this one
6. What function finds the current time or date in MySQL?
Answer
Correct Answer:
CURDATE()
Note: This Question is unanswered, help us to find answer for this one
7. Inside a transaction, several operations need to be performed. What would you do if an exception happens during that transaction?
Answer
Correct Answer:
ROLLBACK
Note: This Question is unanswered, help us to find answer for this one
8. How are permissions implemented in MySQL?
Answer
Correct Answer:
Access control lists
Note: This Question is unanswered, help us to find answer for this one
9. What is the valid way to create a database view in MySQL?
Answer
Correct Answer:
CREATE VIEW v1 AS SELECT * FROM t1;
Note: This Question is unanswered, help us to find answer for this one
10. The left and right joins are also known as _.
Answer
Correct Answer:
Outer Join
Note: This Question is unanswered, help us to find answer for this one
11. Which option modifier tells a program not to exit with an error if it does not recognize the option, but instead to issue a warning?
Answer
Correct Answer:
--loose
Note: This Question is unanswered, help us to find answer for this one
12. Why would you use a common table expression (CTE)?
Answer
Correct Answer:
To break down complex queries and allow reuse within a query.
Note: This Question is unanswered, help us to find answer for this one
13. When a new student is added to a new database, you want new records to be created in the related tables such as Exam, Score and Attendance. How would you accomplish this?
Answer
Correct Answer:
Trigger
Note: This Question is unanswered, help us to find answer for this one
14. A stored routine is a set of SQL statements stored on the server and takes form as either a procedure or a function. Which statement cannot be used inside stored routines?
Answer
Correct Answer:
USE
Note: This Question is unanswered, help us to find answer for this one
15. Which choice is not an available string type for a column?
Answer
Correct Answer:
BIT
Note: This Question is unanswered, help us to find answer for this one
16. How would you retrieve data on all the customers where no phone number is stored?
Answer
Correct Answer:
SELECT * FROM customers WHERE PhoneNumber IS NULL;
Note: This Question is unanswered, help us to find answer for this one
17. Explain the security aspect of stored procedures
Answer
Correct Answer:
Stored procedures are secure, because applications can be given access to stored procedures and not any underlying variables
Note: This Question is unanswered, help us to find answer for this one
18. What is the equivalent of the mysqladmin reload command?
Answer
Correct Answer:
Mysqladmin flush-privileges
Note: This Question is unanswered, help us to find answer for this one
19. Which statement is true about TIMESTAMP and DATETIME data types?
Answer
Correct Answer:
TIMESTAMP and DATETIME are both stored without time zone.
Note: This Question is unanswered, help us to find answer for this one
20. Which command will return a list of triggers in the current database?
Answer
Correct Answer:
SHOW TRIGGERS;
Note: This Question is unanswered, help us to find answer for this one
21. What is the maximum number of columns that can be used by a single table index?
Answer
Correct Answer:
16
Note: This Question is unanswered, help us to find answer for this one
22. Which is a valid constructor for a class named User?
Answer
Correct Answer:
Public User() {}
Note: This Question is unanswered, help us to find answer for this one
23. What is the advantage of using a temporary table instead of a heap table?
Answer
Correct Answer:
The temporary table will be dropped as soon as your session disconnects.
Note: This Question is unanswered, help us to find answer for this one
24. Which choice is not a valid model for a stored procedure parameter?
Answer
Correct Answer:
IN OUT
Note: This Question is unanswered, help us to find answer for this one
25. What is the product of the database designing phase?
Answer
Correct Answer:
A list of entities, their relationship, constraints, data types, and cardinalities
Note: This Question is unanswered, help us to find answer for this one
26. Which query lists the databases on the current server?
Answer
Correct Answer:
SHOW DATABASES;
Note: This Question is unanswered, help us to find answer for this one
27. If you want to use MyISAM instead of InnoDB, which option do you need to specify in the CREATE TABLE statement?
Answer
Correct Answer:
ENGINE
Note: This Question is unanswered, help us to find answer for this one
28. You are importing data as JSON into a new table. You run CREATE TABLE json_data ( city JSON ); and insert rows into this table. What is the correct syntax to see the list of cities?
Answer
Correct Answer:
SELECT city->>'$.name' city FROM json_data;
Note: This Question is unanswered, help us to find answer for this one
29. You need to restore a MySQL database from a backup file. Which command-line tool do you use for the actual data import, after re-creating the database?
Answer
Correct Answer:
Mysql
Note: This Question is unanswered, help us to find answer for this one
30. Which type of backup includes all the changes made to the data since the last full backup was performed?
Answer
Correct Answer:
Differential
Note: This Question is unanswered, help us to find answer for this one
31. When working with MySQL cursor, what must you also declare?
Answer
Correct Answer:
NOT FOUND handler
Note: This Question is unanswered, help us to find answer for this one
32. In data migration, there is often a need to delete duplicate rows as part of data cleanup. Which statement works best?
Answer
Correct Answer:
DELETE JOIN
Note: This Question is unanswered, help us to find answer for this one
33. Which statement about the TRUNCATE TABLE statement is true?
Answer
Correct Answer:
It always first drops, then re-creates a new table. It does not invoke the DELETE triggers associated with the table.
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
34. You are loading data into a table. Which command can you use to make sure that all data is inserted and duplicates rows are discarded?
Answer
Correct Answer:
INSERT IGNORE
Note: This Question is unanswered, help us to find answer for this one
35. What is one reason to introduce data redundancy into a normalized database design?
Answer
Correct Answer:
To reduce corruption in data
Note: This Question is unanswered, help us to find answer for this one
36. In recent versions of MySQL (8.0+), what's the correct syntax to declare a CTE (Common Table Expression)?
Answer
Correct Answer:
WITH cte as (SELECT id FROM users) SELECT ...
Note: This Question is unanswered, help us to find answer for this one
37. Management has requested that you build an employee database. You need to include each employee's current position and salary, as well as all prior positions and salaries with the company. You decide to use a one-to-many structure: an employee table with the main information such as name and address, and an employment table with position and salary history. You can use the employeeID field to connect them. What is employment.employeeID an example of?
Answer
Correct Answer:
Foreign key;
Note: This Question is unanswered, help us to find answer for this one
38. In which table does MySQL store passwords for user accounts?
Answer
Correct Answer:
Mysql.user;
Note: This Question is unanswered, help us to find answer for this one
39. Which choice is not one of the table maintenance statements?
Answer
Correct Answer:
CREATE TABLE;
Note: This Question is unanswered, help us to find answer for this one
40. How would you list the full set of tables in the currently selected database?
Answer
Correct Answer:
SHOW TABLES;
Note: This Question is unanswered, help us to find answer for this one
41. How can you list all columns for a given table?
Answer
Correct Answer:
SHOW COLUMNS FROM table;
Note: This Question is unanswered, help us to find answer for this one
42. What is the MySQL perror command-line utility used for?
Answer
Correct Answer:
To display storage error codes
Note: This Question is unanswered, help us to find answer for this one
43. Which choice is not a processing algorithm for database views?
Answer
Correct Answer:
Updatable
Note: This Question is unanswered, help us to find answer for this one
44. You need to run a complex query with recursive subqueries, but without creating a stored procedure or a function. Which command or clause do you use?
Answer
Correct Answer:
WITH
Note: This Question is unanswered, help us to find answer for this one
45. You manage a database with a table "customers". You created a temporary table also called "customers" with which you are working for the duration of your session. You need to recreate the temporary table with different specs. Which command do you need to run first?
Answer
Correct Answer:
Drop temporary table customers;
Note: This Question is unanswered, help us to find answer for this one
46. You need to make your mysql system secure against attackers. What are you not supposed to do?
Answer
Correct Answer:
Run MySQL server as the unix root user.
Note: This Question is unanswered, help us to find answer for this one
47. You need to make an exact copy of a table, with all columns and indexes. How can you get all of the information needed to accomplish this?
Answer
Correct Answer:
Show create table
Note: This Question is unanswered, help us to find answer for this one
48. Which is the correct syntax of an extended insert statement?
Note: This Question is unanswered, help us to find answer for this one
49. Which statement can you use to load data from a file into the table?
Answer
Correct Answer:
Load data infile (correct if the file is already on the server)
Note: This Question is unanswered, help us to find answer for this one
50. Later versions of mysql support the native json data type for storing json documents. What is a drawback of json columns?
Answer
Correct Answer:
Cannot be indexed directly
Note: This Question is unanswered, help us to find answer for this one
51. What table cannot have a trigger associated with it?
Answer
Correct Answer:
System
Note: This Question is unanswered, help us to find answer for this one
52. What mysql statement is used to check which accounts have specific privileges?
Answer
Correct Answer:
Show grants (displays the privileges and roles that are assigned to a MySQL user account or role)
Note: This Question is unanswered, help us to find answer for this one
53. Each time MySQL is upgraded, it is best to execute mysql_upgrade, which looks for incompatibilities with the upgraded MySQL server. What does this command do, upon finding a table with a possible incompatibility?
Answer
Correct Answer:
It performs a table check and, if problems are found, attempts a table repair.
Note: This Question is unanswered, help us to find answer for this one
54. What is the requirement for using a subquery in the SELECT clause?
Answer
Correct Answer:
The subquery must return a single value.
Note: This Question is unanswered, help us to find answer for this one
55. One form of backup, replication, enables you to maintain identical data on multiple servers, as a _ configuration.
Answer
Correct Answer:
Master-slave
Note: This Question is unanswered, help us to find answer for this one
56. You need to export the data in the customers table into a CSV file, with columns headers in the first row. Which clause do you add to your MySQL command?
Answer
Correct Answer:
UNION
Note: This Question is unanswered, help us to find answer for this one
57. After installing MySQL, it may be necessary to initialize the _ which may be done automatically with some MySQL installation methods.
Answer
Correct Answer:
Data directory
Note: This Question is unanswered, help us to find answer for this one
58. MySQL option files provide a way to specify commonly used options so that they need not be entered on the command line each time you run a program. What is another name for the option files?
Answer
Correct Answer:
Configuration files
Note: This Question is unanswered, help us to find answer for this one
59. In an efficiently designed relational database, what does every table have?
Answer
Correct Answer:
Primary key
Note: This Question is unanswered, help us to find answer for this one
60. How do you select every row in a given table named "inventory"?
Answer
Correct Answer:
SELECT * FROM inventory;
Note: This Question is unanswered, help us to find answer for this one
61. What is the difference between DROP and TRUNCATE?
Answer
Correct Answer:
DROP deletes table completely, removing its definition as well. TRUNCATE clears the table but does not delete the definition.
Note: This Question is unanswered, help us to find answer for this one
62. How can you filter duplicate data while retrieving records from a table?
Answer
Correct Answer:
DISTINCT
Note: This Question is unanswered, help us to find answer for this one
63. You are working with very large tables in your database. Which SQL clause do you use to prevent exceedingly large query results?
Answer
Correct Answer:
LIMIT
Note: This Question is unanswered, help us to find answer for this one
64. A trigger is a database object that is associated with a table, and that activates when a particular event occurs for the table. Which three events are these?
Answer
Correct Answer:
INSERT, UPDATE, DELETE
Note: This Question is unanswered, help us to find answer for this one
65. If you need to order a table of movies by name, which query will work?
Answer
Correct Answer:
SELECT * FROM movies ORDER BY name
Note: This Question is unanswered, help us to find answer for this one
66. How does MySQL differ from SQL?
Answer
Correct Answer:
SQL is a standard language for retrieving and manipulating data from structured databases. MySQL is a relational database management system that is used to manage SQL databases.
Note: This Question is unanswered, help us to find answer for this one
67. In SELECT * FROM clients; what does clients represent?
Answer
Correct Answer:
A table
Note: This Question is unanswered, help us to find answer for this one
68. Which choice is NOT a statement you would use to filter data?
Answer
Correct Answer:
GROUP BY
Note: This Question is unanswered, help us to find answer for this one
69. How can you remove a record using MySQL?
Answer
Correct Answer:
DELETE FROM
Note: This Question is unanswered, help us to find answer for this one
70. In MySQL, queries are always followed by what character?
Answer
Correct Answer:
Semicolon
Note: This Question is unanswered, help us to find answer for this one
71. What is the best type of query for validating the format of an email address in a MySQL table?
Answer
Correct Answer:
A SQL query using a regular expression
Note: This Question is unanswered, help us to find answer for this one
72. Which MySQL command modifies data records in a table?
Answer
Correct Answer:
UPDATE
Note: This Question is unanswered, help us to find answer for this one
73. MySQL uses security based on _ for all connections, queries, and other operations that users can attempt to perform.
Answer
Correct Answer:
Access control lists
Note: This Question is unanswered, help us to find answer for this one
74. Which MySQL command shows the structure of a table?
Answer
Correct Answer:
DESCRIBE table;
Note: This Question is unanswered, help us to find answer for this one
75. MySQL programs are a set of command-line utilities that are provided with typical MySQL distributions. MySQL is designed to be a database.
Answer
Correct Answer:
Client and server
Note: This Question is unanswered, help us to find answer for this one
76. MySQL server can operate in different SQL modes, depending on the value of the sql_mode system variable. Which mode changes syntax and behavior to conform more closely to standard SQL?
Answer
Correct Answer:
ANSI
Note: This Question is unanswered, help us to find answer for this one
77. Which query would NOT be used to administer a MySQL server?
Answer
Correct Answer:
SELECT column FROM tbl
Note: This Question is unanswered, help us to find answer for this one
78. If you were building a table schema to store student grades as a letter (A, B, C, D, or F) which column type would be the best choice?
Answer
Correct Answer:
ENUM
Note: This Question is unanswered, help us to find answer for this one
79. MySQL uses environment variables in some of the programs and command-line operations. Which variable is used by the shell to find MySQL programs?
Answer
Correct Answer:
PATH
Note: This Question is unanswered, help us to find answer for this one
80. Which option of most MySQL command-line programs can be used to get a description of the program's different options?
Answer
Correct Answer:
--help
Note: This Question is unanswered, help us to find answer for this one
81. You must ensure the accuracy and reliability of the data in your database. You assign some constraints to limit the type of data that can go into a table. What type of constraints are you assigning?
Answer
Correct Answer:
Column level
Note: This Question is unanswered, help us to find answer for this one
82. You need to export the entire database, including the database objects, in addition to the data. Which command-line tool do you use?
Answer
Correct Answer:
Mysqldump
Note: This Question is unanswered, help us to find answer for this one
83. When you have a subquery inside of the main query, which query is executed first?
Answer
Correct Answer:
The subquery
Note: This Question is unanswered, help us to find answer for this one
84. If there is no index, the dbms will perform a _____ scan.
Answer
Correct Answer:
Full table
Note: This Question is unanswered, help us to find answer for this one
85. If an error occurs, each of the numeric functions returns a/an ____________ value.
Answer
Correct Answer:
Null
Note: This Question is unanswered, help us to find answer for this one
86. Databases are stored in ______ so that they are available when needed.
Answer
Correct Answer:
Data warehouses
Note: This Question is unanswered, help us to find answer for this one
87. Attributes may share a ____.
Answer
Correct Answer:
Domain
Note: This Question is unanswered, help us to find answer for this one
88. A distributed database is composed of several parts known as database _____.
Answer
Correct Answer:
Fragments
Note: This Question is unanswered, help us to find answer for this one
89. A centralized database management is subject to a problem such as _____.
Answer
Correct Answer:
Growing numbers of remote locations
Note: This Question is unanswered, help us to find answer for this one
90. Which of the following operators have the same precedence as the <= operator?
Answer
Correct Answer:
<=>, >=, >, <=, < <=>
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
91. Which of the following data types can have an additional attribute AUTO_iNCREMENT?
Answer
Correct Answer:
lNT FLOAT
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
92. Which of the following values do logical operators evaluate to in MySQL?
Answer
Correct Answer:
0 TRUE FALSE
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
93.
What will be the result of the following query?
SELECT ExtractValue()
Answer
Correct Answer:
AB
Note: This Question is unanswered, help us to find answer for this one
94.
What will be the result of the following query?
SELECT STRCMP()
Answer
Correct Answer:
1
Note: This Question is unanswered, help us to find answer for this one
95.
What will be the result of the following query?
SELECT(This Is four lines)
Answer
Correct Answer:
This
Is
Four
Lines
Note: This Question is unanswered, help us to find answer for this one
96. Which of the following correctly describes the RLIKE operator?
Answer
Correct Answer:
It is a synonym for the REGEXP Operator.
Note: This Question is unanswered, help us to find answer for this one
97. For the COERCIBILITYO function. what does coercibility value of 0 mean?
Answer
Correct Answer:
Explicit collation
Note: This Question is unanswered, help us to find answer for this one
98.
What will be the result of the following two queries?
1. SELECT POW(2.2):
2. SELECT POWER(2.3):
Answer
Correct Answer:
Query 1 will return 4. while query 2 will return 8.
Note: This Question is unanswered, help us to find answer for this one
99. Which of the following operators are supported by boolean full-text search?
Answer
Correct Answer:
+ - () u
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
100. Invalid year data type values are converted to which of the following?
Answer
Correct Answer:
0000
Note: This Question is unanswered, help us to find answer for this one
101. In MySQL 5.6.5. how many bytes are required to store the DATETIME data type?
Note: This Question is unanswered, help us to find answer for this one
102.
What will be the result of the following query?
SELECT lNSERT()
Answer
Correct Answer:
EquWherer
Note: This Question is unanswered, help us to find answer for this one
103.
Which of the following holds correct while optimizing the query?
1) Use ((a AND D) AND c OR (((a AND D) AND (c AND d)))) instead of
(a AND D AND c) on (3 AND b AND c AND d)
2)Use b>5 AND b=c AND 825 instead of (a
3}Use (8>=5 AND 8:5) OR (8:6 AND 5:5) 0R (8:7 AND 5:6) instead of B=5 OR 8=6
Answer
Correct Answer:
2 and 3
Note: This Question is unanswered, help us to find answer for this one
104. Which of the following can be done using the ALTER TABLE statement?
Answer
Correct Answer:
Add or delete columns of a table. Create or destroy indexes. Change the type of existing columns.
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
105. Which Of the following statements are correct in the context of the lNSERT statement?
Answer
Correct Answer:
All of the above.
Note: This Question is unanswered, help us to find answer for this one
106. Which of the following should be done for optimizing SELECT statements?
Answer
Correct Answer:
All of the above.
Note: This Question is unanswered, help us to find answer for this one
107. Which of the following queries will return 2010-02-02 as the result?
Answer
Correct Answer:
All of the above.
Note: This Question is unanswered, help us to find answer for this one
108. Which of the following queries will return ONE as the result?
Answer
Correct Answer:
SELECT CASE 1 WHEN 1>O THEN 'ONE‘ WHEN 2 THEN 'TWO' ELSE 'MORE' END: SELECT CASE 1 WHEN 1 THEN 'ONE' WHEN 2 THEN 'TWO' ELSE 'MORE' END;
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
109. Which of the following Bit functions is used to invert all bits?
Answer
Correct Answer:
~
Note: This Question is unanswered, help us to find answer for this one
110. Which of the following is an integer division operator?
Answer
Correct Answer:
DIV
Note: This Question is unanswered, help us to find answer for this one
111. How many bytes are required to store the MEDIUMINT numeric data type?
Answer
Correct Answer:
3 bytes
Note: This Question is unanswered, help us to find answer for this one
112. In MySQL 5.6, if either operand has a noninteger type. the operands are converted to DECIMAL and divided using DECIMAL arithmetic before converting the result to BIGINT.
Answer
Correct Answer:
True
Note: This Question is unanswered, help us to find answer for this one
113. Which of the following statements are correct regarding the CREATE TABLE statement?
Answer
Correct Answer:
CHAR, VARCHAR, TEXT data types can include the CHARACTER SET and COLLATE attributes.
Note: This Question is unanswered, help us to find answer for this one
114. For GRANT statement. which of the following is used to grant all permissions to a user?
Answer
Correct Answer:
ON *.*
Note: This Question is unanswered, help us to find answer for this one
115. Which of the following constructs for flow control are supported by MySQL?
Answer
Correct Answer:
IF CASE LOOP lTERATE
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
116. Which of the following are valid MySQL DATETIME and TIMESTAMP value formats?
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
141.
What will be the result of the following two queries?
1. SELECT 2+3
2. SELECT 2+(3'3)-5
Answer
Correct Answer:
Query 1 will return 6. while query 2 will return 6.
Note: This Question is unanswered, help us to find answer for this one
142.
What is the correct order in which the clauses of the SELECT statement are used?
1. SELECT
2. LIMIT
3. WHERE
4. ORDER BY
5. HAVING
6. FROM
Answer
Correct Answer:
1.6.3.5.4.2
Note: This Question is unanswered, help us to find answer for this one
143. Prior to MySOL 5.6.1. what did the isSimpie(g) function always return?
Answer
Correct Answer:
0
Note: This Question is unanswered, help us to find answer for this one
144. Which of the following methods can speed up the INSERT statements?
Answer
Correct Answer:
All of the above.
Note: This Question is unanswered, help us to find answer for this one
145. Which of the following optimization tips holds true?
Answer
Correct Answer:
All of the above.
Note: This Question is unanswered, help us to find answer for this one
146. Which of the following forms of the SELECT statement writes a single row to a file without any formatting?
Answer
Correct Answer:
SELECT INTO DUMPFILE
Note: This Question is unanswered, help us to find answer for this one
147. Which of the following is iNCORRECT regarding the DECIMAL data type?
Answer
Correct Answer:
in a DECIMAL column declaration. the precision and scale cannot be specified.
Note: This Question is unanswered, help us to find answer for this one
148. Which of the following data types has been deprecated in MySQL 5.6?
Answer
Correct Answer:
YEAR(2)
Note: This Question is unanswered, help us to find answer for this one
149.
What will be the result of the following query?
SELECT CONCAT('MY', 'S', 'QL')
Answer
Correct Answer:
NULL MySQL
Note: This Question is unanswered, help us to find answer for this one
150. Which of the following SQL statements will change the table default character set and all character columns (CHAR, VARCHAR, TEXT) to a new character set?
Answer
Correct Answer:
ALTER TABLE tbl_name CONVERT TO CHARACTER SET charset_name;
Note: This Question is unanswered, help us to find answer for this one
151.
Consider the following table named TESTTABLE:
tbIName tbILname
FN LN
FN LN
What will be the result of the following query?
SELECT 1 FROM TESTTABLE WHERE tblName iN ()
Answer
Correct Answer:
1
1
Note: This Question is unanswered, help us to find answer for this one
152. Which of the following ALTER TABLE partition options have been added in MySQL 5.6?
Answer
Correct Answer:
DROP PARTITION
Note: This Question is unanswered, help us to find answer for this one
153. in which of the following types can the CONVERT() function return the results?
Answer
Correct Answer:
All Of the above
Note: This Question is unanswered, help us to find answer for this one
154. Which of the following functions return the smallest integer value not less than the argument specified?
Answer
Correct Answer:
CEIL() CEILING()
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Note: This Question is unanswered, help us to find answer for this one
176.
What is the correct syntax to turn on the global event scheduler?
Answer
Correct Answer:
SET GLOBAL event_scheduler = ON;
Note: This Question is unanswered, help us to find answer for this one
177.
What is the correct syntax to get the MySQL Version?
Answer
Correct Answer:
SELECT VERSION();
Note: This Question is unanswered, help us to find answer for this one
178.
What is the correct syntax to create a view?
Answer
Correct Answer:
CREATE VIEW view_name AS SELECT column_name(s) FROM table_name WHERE condition
Note: This Question is unanswered, help us to find answer for this one
179.
What is the default port for MySQL Server?
Answer
Correct Answer:
3306
Note: This Question is unanswered, help us to find answer for this one
180.
Which of the following are valid Scalar Functions? Check all that apply.
Answer
Correct Answer:
UPPER()
Note: This Question is unanswered, help us to find answer for this one
181.
How do you control the max size of a HEAP table?
Answer
Correct Answer:
MySQL config variable called max_heap_table_size.
Note: This Question is unanswered, help us to find answer for this one
182.
What is the correct syntax for updating a table using LEFT OUTER JOIN?
Answer
Correct Answer:
UPDATE T1 LEFT JOIN T2 ON T2.ID = T1.ID SET T1.COL1 = NEWVALUE WHERE T2.ID IS NULL
Note: This Question is unanswered, help us to find answer for this one
183.
Which of the statements are true for user-defined variables?
Answer
Correct Answer:
User variables are written as $var_name, where the variable name var_name consists of alphanumeric characters, “.”, “_”, and “@”.
Note: This Question is unanswered, help us to find answer for this one
184.
What are the valid types of table present in MySQL? Check all that apply.
Answer
Correct Answer:
MyISAM
Note: This Question is unanswered, help us to find answer for this one
185.
Which of the following are valid MySQL functions? Check all that apply.
Answer
Correct Answer:
FORMAT()
Note: This Question is unanswered, help us to find answer for this one
186.
Which of the following will truncate all tables in a MySQL database?
Answer
Correct Answer:
SELECT Concat('TRUNCATE TABLE ', TABLE_NAME) FROM INFORMATION_SCHEMA.TABLES
Note: This Question is unanswered, help us to find answer for this one
187.
What are the valid modes of parameters in stored routines? Check all that apply.
Answer
Correct Answer:
IN
Note: This Question is unanswered, help us to find answer for this one
188.
Which SQL statement is used to return only different values?
Answer
Correct Answer:
SELECT DISTINCT
Note: This Question is unanswered, help us to find answer for this one
189.
Which of the following is NOT a valid Aggregation Function?
Answer
Correct Answer:
LAST()
Note: This Question is unanswered, help us to find answer for this one
190.
How do you return fifty events starting from 40th? Assume table name is events and you need to select only the column event_title.
Answer
Correct Answer:
SELECT event_title FROM events LIMIT 39, 50;
Note: This Question is unanswered, help us to find answer for this one
191.
Which of the following statement is valid for % and _ in the LIKE clause in a mysql query?
Answer
Correct Answer:
% corresponds to 0 or more characters; _ is exactly one character
Note: This Question is unanswered, help us to find answer for this one
192.
Which of the following is correct about CHAR_LENGTH and LENGTH?
Answer
Correct Answer:
CHAR_LENGTH is character count whereas the LENGTH is byte count.
Note: This Question is unanswered, help us to find answer for this one
193.
What is the correct syntax to switch to a new database in MySQL?
Answer
Correct Answer:
use database_name;
Note: This Question is unanswered, help us to find answer for this one
194.
How do you get the field names and associated type of a MySQL table?
Answer
Correct Answer:
describe table_name;
Note: This Question is unanswered, help us to find answer for this one
195.
Which of the following is NOT a valid string type available for column?
Answer
Correct Answer:
BLOB
Note: This Question is unanswered, help us to find answer for this one
196.
What is the syntax to list all databases in mysql?
Answer
Correct Answer:
show databases;
Note: This Question is unanswered, help us to find answer for this one
197.
Which command converts Unix Timestamp to Mysql Timestamp and vice versa?
Answer
Correct Answer:
FROM_UNIXTIME; UNIX_TIMESTAMP
Note: This Question is unanswered, help us to find answer for this one
198.
What is the correct syntax to grant all privileges on all databases to a user?
Answer
Correct Answer:
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
Note: This Question is unanswered, help us to find answer for this one
199.
The correct syntax to call a stored routine country_hos with a parameter of type VARCHAR is
Answer
Correct Answer:
CALL country_hos('Europe');
Note: This Question is unanswered, help us to find answer for this one
200.
What is the correct syntax to restore a database from command line?
Answer
Correct Answer:
mysql -u username -p database_name<database_name.sql
Note: This Question is unanswered, help us to find answer for this one
201.
Which of the following will restore a MySQL DB from a .dump file?
Answer
Correct Answer:
mysql -u<user> -p <db_backup.dump
Note: This Question is unanswered, help us to find answer for this one
202.
Which of the following is correct syntax for selecting all rows from a table 'PERSONS', with strings in the column 'LASTNAME' starting with 'JOH'?
Answer
Correct Answer:
SELECT * from PERSONS where LASTNAME LIKE 'JOH%';
Note: This Question is unanswered, help us to find answer for this one
203.
Which of the following is the best way to update multiple rows? Example: Name id Col1 Col2 name1 1 6 1 name2 2 2 3 name3 3 9 5 name4 4 16 8 Update Col1= 1 where id = 1 Update Col1= 2 where id = 2 Update Col2= 3 where id = 3 Update Col1= 10 and col2= 12 where id = 4
Answer
Correct Answer:
INSERT INTO table_name (id,Col1,Col2) VALUES (1,1,1),(2,2,3),(3,9,3),(4,10,12) ON DUPLICATE KEY UPDATE Col1=VALUES(Col1),Col2=VALUES(Col2);
Note: This Question is unanswered, help us to find answer for this one
204.
Which of the following will check whether a MySQL database exists or not?
Answer
Correct Answer:
SHOW DATABASES LIKE 'DBname';
Note: This Question is unanswered, help us to find answer for this one
205.
Select examples with a valid comment syntax:
Answer
Correct Answer:
SELECT 1+1 /* Comment */;
Note: This Question is unanswered, help us to find answer for this one
206.
InnoDB prevents which of the following operations when innodb_force_recovery is greater than 0?
Answer
Correct Answer:
INSERT
Note: This Question is unanswered, help us to find answer for this one
207.
Which of the following are valid encryption functions?
Answer
Correct Answer:
MD5
Note: This Question is unanswered, help us to find answer for this one
208.
With which of the following you can not associate a Trigger?
Answer
Correct Answer:
Permanent tabe
Note: This Question is unanswered, help us to find answer for this one
209.
Consider the following Table EMP: --------------- empId empName empSalary empJoinDate Which SQL is incorrect for finding out the count of records on EMP table where empJoinDate is between 2012-10-01 and 2012-12-30?
Answer
Correct Answer:
Select count(*) from EMP where empJoinDate between '2012-10-01' and 2012-12-30' group by EXTRACT(YEAR_MONTH from empJoinDate );
Note: This Question is unanswered, help us to find answer for this one
210.
Which of the following statements is correct in regards to the syntax of the code below? SELECT table1.this, table2.that, table2.somethingelse FROM table1 INNER JOIN table2 ON table1.foreignkey = table2.primarykey WHERE (some other conditions)
Answer
Correct Answer:
All of the Above
Note: This Question is unanswered, help us to find answer for this one
211.
Which of the following is not a valid Bit operator?
Answer
Correct Answer:
&&
Note: This Question is unanswered, help us to find answer for this one
212.
How can the following error be solved in MySQL? ERROR 1153: Got a packet bigger than 'max_allowed_packet' bytes
Answer
Correct Answer:
By specifying on the command line: mysql --max_allowed_packet=100M -u root By specifying on the command line: mysql --max_allowed_packet=100M -u root -p database < dump.sql and updating the my.cnf or
my.ini files with the following lines: set global net_buffer_length=1000000; set global max_allowed_packet=1000000000;
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
213.
Is there any function in MySQL that allows for replace through a regular expression?
Answer
Correct Answer:
None of the Above
Note: This Question is unanswered, help us to find answer for this one
214.
What is the most common use of the mysql EXPLAIN statement?
Answer
Correct Answer:
To analyze the execution of a query.
Note: This Question is unanswered, help us to find answer for this one
215.
Which of the following is the correct way to change the character set to UTF8?
Answer
Correct Answer:
Add the following lines in my.cnf: [mysqld] init_connect='SET collation_connection = utf8_unicode_ci' character-set-server = utf8 collation-server = utf8_unicode_ci [client] default-character-set = utf8
Note: This Question is unanswered, help us to find answer for this one
216.
When running the following SELECT query: SELECT ID FROM ( SELECT ID, name FROM ( SELECT * FROM employee ) ); The error message 'Every derived table must have its own alias' appears. Which of the following is the best solution for this error?
Answer
Correct Answer:
SELECT ID FROM ( SELECT ID, name FROM ( SELECT * FROM employee ) AS T ) AS T;
Note: This Question is unanswered, help us to find answer for this one
217.
Which function is used to get the higher of two values, a and b, in MySQL?
Answer
Correct Answer:
GREATEST(a,b)
Note: This Question is unanswered, help us to find answer for this one
218.
Suppose a table has the following records:
+--------------+-------------+----------------+
| Item | Price | Brand |
+--------------+-------------+----------------+
| Watch | 100 | abc | | Watch | 200 | xyz |
| Glasses | 300 | bcd | | Watch | 500 | def |
| Glasses | 600 | fgh |
+--------------+-------------+----------------+
Which of the following will select the highest-priced record per item?
Answer
Correct Answer:
select item, brand, max(price) from items group by item
Note: This Question is unanswered, help us to find answer for this one
219.
Examine the code given below: SELECT employee_id FROM employees WHERE commission_pct=.5 OR salary > 23000 Which of the following statements is correct with regard to this code?
Answer
Correct Answer:
It returns employees who have 50% commission rate or salary greater than $23,000
Note: This Question is unanswered, help us to find answer for this one
220.
Which approach can be used to find all occurrences of text ‘’owner’’ in all fields of all tables in a MySQL, database?