Skip to content

wcsodw1/SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

SQL

how I think is the important part with SQL

SQL (Structured Query Language) is a programming language designed for managing and manipulating relational databases. It allows you to interact with databases by performing various operations such as creating, retrieving, updating, and deleting data. Here are some basic concepts and commands you should know about SQL:

1.Database Basics:

Database: A structured collection of data. Table: A collection of related data organized into rows (records) and columns (fields).

2.SQL Commands:

SELECT: Retrieves data from one or more tables. INSERT: Adds new records into a table. UPDATE: Modifies existing records in a table. DELETE: Removes records from a table. CREATE DATABASE: Creates a new database. CREATE TABLE: Creates a new table. ALTER TABLE: Modifies an existing table structure. DROP TABLE: Deletes a table. WHERE: Specifies conditions for selecting or filtering data. JOIN: Combines records from two or more tables based on a related column. GROUP BY: Groups rows based on a specified column. ORDER BY: Sorts the result set based on one or more columns. LIMIT: Limits the number of rows returned by a query. DISTINCT: Returns unique values from a column.

3.Data Manipulation Language (DML):

DML commands are used to manipulate data within the database. Examples: SELECT, INSERT, UPDATE, DELETE.

4.Data Definition Language (DDL):

DDL commands are used to define the database structure. Examples: CREATE, ALTER, DROP.

5.Data Control Language (DCL):

DCL commands are used to control access to the database. Examples: GRANT, REVOKE.

6.Constraints:

Constraints enforce rules on the data in a table. Examples: PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL.

7.Filtering and Sorting:

WHERE clause: Filters rows based on specified conditions. ORDER BY clause: Sorts the result set based on specified columns.

8.Aggregation:

Functions like SUM, AVG, COUNT, MAX, MIN can be used to perform calculations on columns.

9.Joins:

Joins combine data from multiple tables based on related columns. Types of joins: INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN.

10.Indexes:

Indexes improve the performance of database operations by allowing faster data retrieval.

(!)These are some of the basic concepts and commands in SQL. However, SQL is a powerful language with many advanced features and capabilities. It's recommended to refer to the specific SQL documentation or tutorials for detailed information on the database management system (DBMS) you are using.

About

how I think is the important part with SQL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published