MYSQL MCQs - 10
What is the purpose of the AVG() function in MySQL? A) To return the maximum value of a column B) To return the minimum value of a co...
What is the purpose of the AVG() function in MySQL? A) To return the maximum value of a column B) To return the minimum value of a co...
What is the purpose of the IFNULL() function in MySQL? A) To check if a value is null B) To return the first non-null value in a list...
What is the purpose of the DATE_FORMAT() function in MySQL? A) To calculate the difference between two dates B) To return the current...
What is the purpose of the COUNT() function in MySQL? A) To return the number of rows in a table B) To calculate the total value of a...
What is the purpose of the NOW() function in MySQL? A) To return the current date and time B) To return the current date C) To ret...
What is the purpose of the CONCAT_WS() function in MySQL? A) To concatenate values from multiple rows into a single string B) To conc...
What is the purpose of the GROUP_CONCAT() function in MySQL? A) To calculate the average value of a numeric column B) To concatenate ...
What is the purpose of the JOIN keyword in MySQL? A) To perform aggregate functions on grouped data B) To filter rows based on a spec...
Which SQL command is used to retrieve specific columns from a table in MySQL? A) GET B) FETCH C) SELECT D) FILTER Answer...
Which statement is used to create a new table in MySQL? A) CREATE B) INSERT C) UPDATE D) SELECT Answer: A) CREATE ...
Index is used to make data search faster in table. We use index to get the record quickly without searching each row in a database table whenever the table is accessed. We can create an index by using one or more columns of the table for accessing the records....
MySQL DROP Database query is used to delete database from mysql. It removes database with all the tables, indexes and constraints permanently....
The DROP TABLE Query is used to drop an existing table in a database. We cannot recover the lost data after droping table....
The ALTER TABLE query is used to add, delete, rename or modify any table field in an existing table. The ALTER TABLE query is also used to add and drop various constraints on an existing table....
The GROUP BY statement is often used with aggregate functions like COUNT, MAX, MIN, SUM, AVG to group the result-set by one or more columns. The MYSQL GROUP BY Clause is used to collect data from multiple records and group the result by one or more column. It is generally used in a SELECT statement....
MySQL CROSS JOIN is used to combine all possibilities of the two or more tables and returns the result that contains every row from all contributing tables. The CROSS JOIN clause returns the Cartesian product of rows from the joined tables. The CROSS JOIN is also known as CARTESIAN JOIN, which provides the Cartesian product of all associated tables. if each table has n and m rows respectively, the result set will have n x m rows....
RIGHT JOIN Query in mysql is used to join multiple tables which return all the records from the second (right side) table even no matching records found from the first (left-side) table. If it will not find any matches record from the left side first table, then returns null....
LEFT JOIN Query in mysql is used to join multiple tables which return all the records from the first (left-side) table even no matching records found from the second (right side) table. If it will not find any matches record from the right side table, then returns null....
INNER JOIN keyword is used to join two tables and selects records that have matching values in both tables....
MYSQL SELECT Query is used to fetch existing records from database....