Get the App
SLTechnology News&Howtos  ›  Database  › 

Common additions, deletions, modifications and queries in sql

Shulou Source: shulou.com Published: 2022-06-01 14:02:32 10月03日 Update

Operational data (DML)

2.1 insert data (add)

Insert statement: insert only one row at a time.

INSERT INTO table_name (column1,column2,column3...)

VALUES (value1,value2,value3...)

2.2 modify data

UPDATE table_name

SET columnName = value [, columnName = value]...

[WHERE condition]

2.3 deleting data

DELETE FROM tablename

[WHERE condition]

2.4 query data

Select * from table_name

[WHERE condition]

Ascending order:

Sql is displayed in ascending order of ID by default.

Select * from work_detail

Descending order:

Select * from work_detail ORDER BY id DESC

Tags: Data ascending order one line statement query common Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi vpn Shulou Information NVidia Apple