Skip to content

emersondivB0/MySQL-Learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQL and MySQL Server Studies

Welcome to the Repository!

This repository serves as a record of my studies, progress, and personal projects related to SQL and MySQL Server.

Main Steps

  • Star this project to show your support and keep track of updates.

Learning Topics

Databases

  • 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.

Tables

  • SHOW TABLES: Shows all the tables in the selected database.
  • SHOW CREATE TABLE table_name: Displays the complete CREATE 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.

Data Manipulation

  • 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.

Queries and Functions

  • 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.

Miscellaneous

  • 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

img

About

All my learnings projects and scripts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published