当前位置:网站首页>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

边栏推荐
- Unspeakable Prometheus monitoring practice
- The boss said: whoever wants to use double to define the amount of goods, just pack up and go
- Résumé des outils communs et des points techniques de l'examen PMP
- Contest3145 - the 37th game of 2021 freshman individual training match_ J: Eat radish
- Unity writes a character controller. The mouse controls the screen to shake and the mouse controls the shooting
- PMP daily three questions (February 14, 2022)
- Gee import SHP data - crop image
- 2022 Guangxi provincial safety officer a certificate examination materials and Guangxi provincial safety officer a certificate simulation test questions
- 查詢效率提昇10倍!3種優化方案,幫你解决MySQL深分頁問題
- Experience summary of the 12th Blue Bridge Cup (written for the first time)
猜你喜欢

Libcblas appears when installing opencv import CV2 so. 3:cannot open shared object file:NO such file or directory

Imperial cms7.5 imitation "D9 download station" software application download website source code

MySQL advanced (Advanced) SQL statement (I)

Setting methods, usage methods and common usage scenarios of environment variables in postman

Talking about custom conditions and handling errors in MySQL Foundation

Bugku Zhi, you have to stop him

The boss said: whoever wants to use double to define the amount of goods, just pack up and go

On Valentine's day, I code a programmer's exclusive Bing Dwen Dwen (including the source code for free)

Ningde times and BYD have refuted rumors one after another. Why does someone always want to harm domestic brands?

Solve the problem that the tabbar navigation at the bottom of vantui does not correspond to the page (window.loading.hash)
随机推荐
Crawler practice website image batch download
2006 translation
Unity writes a character controller. The mouse controls the screen to shake and the mouse controls the shooting
Take you to master the formatter of visual studio code
Redis transaction
Global and Chinese market of small batteries 2022-2028: Research Report on technology, participants, trends, market size and share
false sharing
High level application of SQL statements in MySQL database (I)
2022 Guangxi provincial safety officer a certificate examination materials and Guangxi provincial safety officer a certificate simulation test questions
Problems and solutions of several concurrent scenarios of redis
Site favorites
7 * 24-hour business without interruption! Practice of applying multiple live landing in rookie villages
Question C: Huffman tree
Mysql to PostgreSQL real-time data synchronization practice sharing
I stepped on a foundation pit today
JS object definition
Key knowledge of embedded driver
Résumé: entropie, énergie libre, symétrie et dynamique dans le cerveau
Remote work guide
Summarize the past to motivate yourself to move on