This repository serves as a record of my studies, progress, and personal projects related to SQL and MySQL Server.
- Star this project to show your support and keep track of updates.
SHOW DATABASES
: Displays information about all existing databases in the server.USE database_name
: Sets the specified database as the current database.CREATE DATABASE database_name
: Creates a new database.DROP DATABASE database_name
: Deletes a database.
SHOW TABLES
: Shows all the tables in the selected database.SHOW CREATE TABLE table_name
: Displays the completeCREATE TABLE
statement used to create the table.DESCRIBE table_name
: Provides information about the columns of a table.CREATE TABLE table_name(column1, column2, column3..)
: Creates a new table with specified columns.ALTER TABLE table_name ADD(column1, column2, column3..)
: Adds columns to an existing table.ALTER TABLE table_name DROP(column1)
: Deletes specified columns from an existing table.DROP TABLE table_name
: Deletes a table.RENAME TABLE old_table_name TO new_table_name
: Renames a table.
SELECT * FROM table_name
: Retrieves all records from a table.SELECT column1, column2, column3.. FROM table_name WHERE condition
: Retrieves specific columns from a table based on a condition.INSERT INTO table_name (column1, column2, column3 . . ) VALUES(value1, value2, value3 . . )
: Inserts a new record into a table with specified values.UPDATE table_name SET column1 = value1, column2 = value2, column3 = value3.. WHERE condition
: Updates records in a table with new values based on a condition.DELETE FROM table_name WHERE condition
: Deletes records from a table based on a condition.
SELECT NOW()
: Retrieves the current date and time.SELECT 2 + 4;
: Executes a simple arithmetic expression.COUNT
: Returns the total number of records matching a condition from a table.MAX
: Retrieves the maximum numeric value of a specific column in a table.MIN
: Retrieves the minimum numeric value of a specific column in a table.LIMIT
: Sets the limit of the number of records in the result set.BETWEEN
: Retrieves records within a specified range.DISTINCT
: Fetches distinct records, avoiding duplicates.IN
: Verifies if a row is contained in a set of given values.LIKE
: Fetches records matching a specified string pattern.
- Comments: Allows adding multi-line or single-line comments to the code.
AUTO_INCREMENT
: Generates a unique identification field for a new row.FOREIGN KEY
: Establishes a relationship between tables using a primary key from another table.
Feel free to explore this repository and learn along with me!
💙 Emerson González