当前位置:网站首页>MySQL query
MySQL query
2022-07-04 02:53:00 【sshi9】
Simple query
It is preferred to create a database and import the required sql file

View table structure

Query a field
Check the name of the employee
Select The statement is followed by the field name ,select Is the key word ,select And field names are separated by spaces ,from Represents the table to query , It is separated from the field by a space
Query multiple fields
Query employee's number and name

Query multiple fields ,select Fields in adopt comma Interval is enough , The last field , That is to say from The preceding fields cannot use commas
Query all fields

Conditions of the query
Conditional query needs to use where sentence ,where It must be put in from After the statement table
The following operators are supported
Operator | explain |
= | be equal to |
<> or != | It's not equal to |
< | Less than |
<= | Less than or equal to |
> | Greater than |
>= | Greater than or equal to |
between … and …. | Between two values , Equate to >= and <= |
is null | by null(is not null Not empty ) |
and | also |
or | perhaps |
in | contain , It's equivalent to more than one or(not in Not in this range ) |
not | not You can take non , Mainly used in is or in in |
like | like It is called fuzzy query , Support % Or underline match % Match any character Underline , An underscore matches only one character |
Example
The inquiry salary is 5000 The employees'

Usage is in where Add the required conditions and operators after
like Can fuzzy query
Check the name with M At the beginning, all the employees

边栏推荐
- VRRP+BFD
- PTA tiantisai l1-079 tiantisai's kindness (20 points) detailed explanation
- Yyds dry goods inventory override and virtual of classes in C
- Record a problem that soft deletion fails due to warehouse level error
- MySQL advanced (Advanced) SQL statement (I)
- Zblog collection plug-in does not need authorization to stay away from the cracked version of zblog
- Li Chuang EDA learning notes 13: electrical network for drawing schematic diagram
- 2022 examination summary of quality controller - Equipment direction - general basis (quality controller) and examination questions and analysis of quality controller - Equipment direction - general b
- C language black Technology: Archimedes spiral! Novel, interesting, advanced~
- 13. Time conversion function
猜你喜欢

Talking about custom conditions and handling errors in MySQL Foundation

Johnson–Lindenstrauss Lemma

I stepped on a foundation pit today

Learn these super practical Google browser skills, girls casually flirt
![Measurement fitting based on Halcon learning [4] measure_ arc. Hdev routine](/img/3a/cf6285ae1c01bda42874eeca9fe5b1.jpg)
Measurement fitting based on Halcon learning [4] measure_ arc. Hdev routine

17. File i/o buffer

Buuctf QR code

C learning notes: C foundation - Language & characteristics interpretation

3D game modeling is in full swing. Are you still confused about the future?

Node write API
随机推荐
Hospital network planning and design document based on GLBP protocol + application form + task statement + opening report + interim examination + literature review + PPT + weekly progress + network to
ZABBIX API pulls the values of all hosts of a monitoring item and saves them in Excel
LV1 tire pressure monitoring
I stepped on a foundation pit today
Problems and solutions of several concurrent scenarios of redis
Unspeakable Prometheus monitoring practice
Li Chuang EDA learning notes IX: layers
查詢效率提昇10倍!3種優化方案,幫你解决MySQL深分頁問題
2022 attached lifting scaffold worker (special type of construction work) free test questions and attached lifting scaffold worker (special type of construction work) examination papers 2022 attached
Solve the problem that the tabbar navigation at the bottom of vantui does not correspond to the page (window.loading.hash)
[development team follows] API specification
Keep an IT training diary 054- opening and closing
1day vulnerability pushback skills practice (3)
MySQL advanced (Advanced) SQL statement (I)
A. Min Max Swap
Advanced learning of MySQL -- Application -- index
Measurement fitting based on Halcon learning [4] measure_ arc. Hdev routine
Sword finger offer 14- I. cut rope
Mysql-15 aggregate function
Contest3145 - the 37th game of 2021 freshman individual training match_ D: Ranking