当前位置:网站首页>SQL statement
SQL statement
2022-07-03 02:31:00 【Python's path to immortality】
INSERT
https://www.w3school.com.cn/sql/sql_insert.asp
INSERT INTO table_name ( Column 1, Column 2,…) VALUES ( value 1, value 2,…)
DELETE
https://www.w3school.com.cn/sql/sql_delete.asp
DELETE FROM The name of the table WHERE Column name = value
UPDATE
https://www.w3school.com.cn/sql/sql_update.asp
UPDATE The name of the table SET Column name = The new value WHERE Column name = Certain value
SELECT
https://www.w3school.com.cn/sql/sql_select.asp
SELECT Column name FROM The name of the table
Group query :GROUP BY
The content to be queried in group query should be statistical information
SELECT (1) as a, mode
,COUNT(*) FROM t_help
WHERE user_id = ‘060c43ee7c11437785bd8b35f72c0649’ GROUP BY mode
stay select in , You can put direct content ,eg: (1) as a, There can be another query in brackets ,
And grouped fields , You have to find it out in the front
The joint query :LEFT JOIN
https://www.w3school.com.cn/sql/sql_join_left.asp
Through the common fields of the two tables , Jointly query all data
SELECT *
FROM table_name1
LEFT JOIN table_name2
ON table_name1.column_name=table_name2.column_name
Common aggregate functions :
count() Count
sum() Sum up
avg() The average
max() Maximum
min() minimum value
边栏推荐
- 微服务组件Sentinel (Hystrix)详细分析
- Leetcode (540) -- a single element in an ordered array
- Gbase 8C system table PG_ collation
- easyPOI
- awk从入门到入土(3)awk内置函数printf和print实现格式化打印
- Compréhension simple de SVG
- Producer consumer model based on thread pool (including blocking queue)
- Unrecognized SSL message, plaintext connection?
- GBase 8c系统表-pg_attribute
- Choose it when you decide
猜你喜欢
random shuffle注意
Flink CDC mongoDB 使用及Flink sql解析monggo中复杂嵌套JSON数据实现
RestCloud ETL 跨库数据聚合运算
Job object of collaboration in kotlin
UDP receive queue and multiple initialization test
[Flutter] dart: class;abstract class;factory;类、抽象类、工厂构造函数
基于线程池的生产者消费者模型(含阻塞队列)
Summary of interview project technology stack
[shutter] bottom navigation bar page frame (bottomnavigationbar bottom navigation bar | pageview sliding page | bottom navigation and sliding page associated operation)
线程安全的单例模式
随机推荐
Machine learning process and method
The sandbox explains its vision for the meta universe platform
Compréhension simple de SVG
Gbase 8C system table PG_ conversion
【翻译】具有集中控制平面的现代应用负载平衡
错误Invalid bound statement (not found): com.ruoyi.stock.mapper.StockDetailMapper.xxxx解决
GBase 8c系统表-pg_collation
Error when installing MySQL in Linux: starting mysql The server quit without updating PID file ([FAILED]al/mysql/data/l.pid
Cfdiv2 fixed point guessing- (interval answer two points)
Gbase 8C trigger (III)
机器学习流程与方法
[Hcia]No.15 Vlan间通信
random shuffle注意
[advanced ROS] Lesson 6 recording and playback in ROS (rosbag)
GBase 8c系统表-pg_conversion
Oauth2.0 authentication, login and access "/oauth/token", how to get the value of request header authorization (basictoken)???
Apple releases MacOS 11.6.4 update: mainly security fixes
Kotlin middle process understanding and Practice (II)
Kotlin middle process understanding and Practice (I)
8 free, HD, copyright free video material download websites are recommended