filmov
tv
SQL Assignment & Interview Queries with Solutions (example) | MySQL Database part 1

Показать описание
Sql assignment queries with solution(answer) | mysql Database
Data Manipulation Language (DML):
SELECT: Retrieves data from a database.
INSERT: Adds new data to a table.
UPDATE: Modifies existing data in a table.
DELETE: Removes data from a table.
Data Definition Language (DDL):
CREATE: Creates database objects like tables, views, indexes, and users.
ALTER: Modifies the structure of existing database objects.
DROP: Deletes database objects.
TRUNCATE: Removes all data from a table without deleting the table structure.
Data Control Language (DCL):
GRANT: Gives users permission to perform actions on database objects.
REVOKE: Revokes permissions from users.
Common Query Clauses:
WHERE: Specifies conditions for filtering data.
ORDER BY: Sorts the results of a query.
GROUP BY: Groups data together based on specified columns.
HAVING: Filters groups based on aggregate functions.
Joining Tables:
INNER JOIN: Combines rows from two tables based on a common column.
LEFT JOIN: Includes all rows from the left table, even if there's no match in the right table.
RIGHT JOIN: Includes all rows from the right table, even if there's no match in the left table.
FULL JOIN: Includes all rows from both tables, regardless of whether there's a match.
Other Common Commands:
USE: Selects a database to work with.
SHOW: Displays information about database objects.
DESCRIBE: Provides details about the structure of a table.
COMMIT: Saves changes made to the database.
ROLLBACK: Reverts changes made to the database.
Data Manipulation Language (DML):
SELECT: Retrieves data from a database.
INSERT: Adds new data to a table.
UPDATE: Modifies existing data in a table.
DELETE: Removes data from a table.
Data Definition Language (DDL):
CREATE: Creates database objects like tables, views, indexes, and users.
ALTER: Modifies the structure of existing database objects.
DROP: Deletes database objects.
TRUNCATE: Removes all data from a table without deleting the table structure.
Data Control Language (DCL):
GRANT: Gives users permission to perform actions on database objects.
REVOKE: Revokes permissions from users.
Common Query Clauses:
WHERE: Specifies conditions for filtering data.
ORDER BY: Sorts the results of a query.
GROUP BY: Groups data together based on specified columns.
HAVING: Filters groups based on aggregate functions.
Joining Tables:
INNER JOIN: Combines rows from two tables based on a common column.
LEFT JOIN: Includes all rows from the left table, even if there's no match in the right table.
RIGHT JOIN: Includes all rows from the right table, even if there's no match in the left table.
FULL JOIN: Includes all rows from both tables, regardless of whether there's a match.
Other Common Commands:
USE: Selects a database to work with.
SHOW: Displays information about database objects.
DESCRIBE: Provides details about the structure of a table.
COMMIT: Saves changes made to the database.
ROLLBACK: Reverts changes made to the database.
Комментарии