当前位置:网站首页>SQL basic statement DQL select and extract DML insert delete
SQL basic statement DQL select and extract DML insert delete
2022-07-25 22:10:00 【Not ashamed_】
SQL Sentences can be roughly divided into four categories :
1) DDL: Data definition language , establish 、 Delete 、 modify the database 、 Data table .
2) DML: Data management language , Add the data in the data table 、 Delete 、 Modify the operating .
3) DQL: Data query language , Query the data in the data table .
4) DCL: Data control language , Permissions on the database 、 Role, etc .
Here first write DQL sentence
Simple query
The simplest select
select Field list from Table name
Field and table rename
select Field name as Alias , Field name as Alias from Table name as Alias
where
Filter query records . Only records that meet the screening criteria , Will appear in the query results .
1) Comparison operator
Operator effect
“>” Greater than
“>=” Greater than or equal to
"<" Less than
“<=” Less than or equal to
“=” be equal to
“!=,<>” It's not equal to
null Value does not participate in the comparison operation
2) Logical operators
Operator effect
and Logic and
or Logic or
not Logic is not
3) Null Value judgment
Operator effect
is null Field is null
is not null Field is not null
4) between…and…
Range of judgment , Closed interval .
amount to Field >= value and Field <= value .
5) Fuzzy query
Field like ' The rules '
The rules : % Represents any number of arbitrary characters ,_ Represents any character .
SQL Case insensitive ,like,= They're all case insensitive .
6) in
Field in ( value , value , value ...)
Field not in ( value , value , value ...)
Group query
Use group by In the queried data , Grouping , Records with the same specified fields will be merged into a group .
group by Field name , ...
group by 1, 2, ... // The subscript of the field , from 1 Start
边栏推荐
- Redis基础2(笔记)
- Preliminary study on Tesseract OCR
- Detailed summary of C language game dual cache to solve the flash screen problem [easy to understand]
- How many bytes does Boolean occupy?
- kubernetes之VictoriaMetrics单节点
- After 2 years of functional testing, I feel like I can't do anything. Where should I go in 2022?
- Children's programming electronic society graphical programming level examination scratch level 1 real problem analysis (judgment question) June 2022
- [51nod1676 undirected graph isomorphism] undirected graph hash [easy to understand]
- 数据库进阶·如何针对所有用户数据中没有的数据去加入随机的数据-蜻蜓Q系统用户没有头像如何加入头像数据-优雅草科技kir
- 6-18漏洞利用-后门连接
猜你喜欢

【GO基础02】第一个程序

Children's programming electronic society graphical programming level examination scratch level 1 real problem analysis (judgment question) June 2022

什么是分区分桶?

Don't vote, software testing posts are saturated

6-17漏洞利用-反序列化远程命令执行漏洞

如何实现一个App应用程序,限制用户时间使用?

Jmeter--- set proxy recording request

2022 love analysis ― bank digitalization practice report

H5幸运刮刮乐抽奖 免公众号+直运营

The automation testing post spent 20K recruiting, but in the end, there was no suitable one. Both fresh students are better than them
随机推荐
C language left value and right value description [easy to understand]
微信发卡小程序源码-自动发卡小程序源码-带流量主功能
Open source RSS subscriber freshrss
[fan Tan] after the arrival of Web3.0, where should testers go? (ten predictions and suggestions)
How to quickly build a picture server [easy to understand]
『Skywalking』. Net core fast access distributed link tracking platform
After three years of software testing at Tencent, I was ruthlessly dismissed in July, trying to wake up my brother who was paddling
Redis usage details
Preliminary study on Tesseract OCR
突破性思维在测试工作中的应用
EL表达式改进JSP
什么是分区分桶?
The testing work is not valued. Have you changed your position?
El expression improves JSP
JS timer and swiper plug-in
关于接口测试你想知道的都在这儿了
jenkins+SVN配置
什么是类加载?类加载的过程?
开源的RSS订阅器FreshRSS
Is there any document for synchronizing from Oracle to ODPs?