Get 20% off on all courses. Enroll now!
ANS : (a) SQL stands for Structured Query Language.
ANS : (a) The correct SQL statement to retrieve data is SELECT * FROM table_name;.
ANS : (a) The correct SQL statement to update data is UPDATE table_name SET column1 = value1;.
ANS : (a) The correct SQL statement to delete data is DELETE FROM table_name WHERE condition;.
ANS : (a) The correct SQL statement to create a new table is CREATE TABLE table_name;.
ANS : (a) The correct SQL statement to modify the structure of an existing table is ALTER TABLE table_name;.
ANS : (a) The JOIN clause is used to combine rows from two or more tables based on a related column.
ANS : (d) All of the above are types of JOIN in SQL.
ANS : (a) The default sorting order of the ORDER BY clause is Ascending.
ANS : (a) The correct SQL statement to create an index is CREATE INDEX index_name ON table_name (column_name);.
ANS : (a) The GROUP BY clause is used to group rows that have the same values in specified columns.
ANS : (b) The DISTINCT keyword is used to retrieve unique values from a column in SQL.
ANS : (a) The HAVING clause is used to filter records after grouping.
ANS : (a) The correct SQL statement to count the number of rows is SELECT COUNT(*) FROM table_name;.
ANS : (a) The LIMIT clause is used to restrict the number of rows returned by a query.
ANS : (a) The correct SQL statement to create a view is CREATE VIEW view_name AS SELECT column1, column2 FROM table_name;.
ANS : (a) The UNION operator is used to combine the results of two or more SELECT statements.
ANS : (a) The correct SQL statement to drop a table is DROP TABLE table_name;.
ANS : (a) The FOREIGN KEY constraint is used to ensure referential integrity between two tables.
ANS : (a) The MAX() function is used to find the maximum value in a column.
ANS : (a) The WHERE clause is used to filter records.
ANS : (a) ORDER BY is used to sort the result-set.
ANS : (c) DROP TABLE is used to remove a table completely from the database.
ANS : (b) The COUNT() function returns the number of rows that matches a specified criterion.
ANS : (c) The default port for MySQL is 3306.
ANS : (b) TRUNCATE removes all records from a table without logging individual row deletions.
ANS : (c) GROUP BY is used to group rows with the same values.
ANS : (c) LIMIT is used to restrict the number of rows returned by a query.
ANS : (b) ALTER is used to change the structure of an existing table.
ANS : (c) INNER JOIN returns only rows with matching values in both tables.
ANS : (b) The HAVING clause is used to filter records after the GROUP BY operation.
ANS : (b) DISTINCT is used to select only unique (different) values.
ANS : (c) DROP is used to delete an entire table from the database.
ANS : (c) A stored procedure is a set of SQL statements stored in the database for reuse.
ANS : (b) UPDATE is used to modify existing records in a table.
ANS : (b) NOW() returns the current date and time.
ANS : (c) SUM() returns the total of the specified numeric column.
ANS : (b) AUTO_INCREMENT automatically generates a unique value when a new record is inserted.
ANS : (b) InnoDB is the default storage engine in MySQL.
ANS : (a) INDEX is used to improve the speed of data retrieval operations.
ANS : (c) SELECT DISTINCT is used to return only different (distinct) values.
ANS : (b) TRUNCATE removes all rows from a table and resets auto-increment values.
ANS : (b) WHERE is used to filter records that meet a certain condition.
ANS : (c) GROUP BY groups rows that have the same values into summary rows.
ANS : (a) ORDER BY is used to sort the result set in ascending or descending order.
ANS : (c) AVG() is used to return the average value of a numeric column.
ANS : (a) RENAME TABLE old_name TO new_name; is used to rename a table.
ANS : (b) LIMIT restricts the number of rows returned by the SELECT query.
ANS : (c) IS NULL checks whether a value is NULL (i.e., missing or undefined).
ANS : (b) COUNT() returns the number of rows that match a specified condition.