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

边栏推荐
- 2022 registration examination for safety production management personnel of fireworks and firecracker production units and examination skills for safety production management personnel of fireworks an
- (column 23) typical C language problem: find the minimum common multiple and maximum common divisor of two numbers. (two solutions)
- Network communication basic kit -- IPv4 socket structure
- Talking about custom conditions and handling errors in MySQL Foundation
- Node solves cross domain problems
- Lichuang EDA learning notes 14: PCB board canvas settings
- Short math guide for latex by Michael downs
- Global and Chinese market of thin film deposition systems 2022-2028: Research Report on technology, participants, trends, market size and share
- How to use websocket to realize simple chat function in C #
- Résumé: entropie, énergie libre, symétrie et dynamique dans le cerveau
猜你喜欢

Dans la recherche de l'intelligence humaine ai, Meta a misé sur l'apprentissage auto - supervisé

中電資訊-信貸業務數字化轉型如何從星空到指尖?

MySQL advanced (Advanced) SQL statement (I)

Bugku Zhi, you have to stop him

150 ppt! The most complete "fair perception machine learning and data mining" tutorial, Dr. AIST Toshihiro kamishima, Japan
![[Yugong series] February 2022 attack and defense world advanced question misc-84 (MySQL)](/img/4d/4a6b76896bf81a27d036a047f68b2b.jpg)
[Yugong series] February 2022 attack and defense world advanced question misc-84 (MySQL)

Solve the problem that the tabbar navigation at the bottom of vantui does not correspond to the page (window.loading.hash)

Mysql-15 aggregate function

Valentine's Day - 9 jigsaw puzzles with deep love in wechat circle of friends

The boss said: whoever wants to use double to define the amount of goods, just pack up and go
随机推荐
How to use STR function of C language
A. ABC
High level application of SQL statements in MySQL database (I)
3D game modeling is in full swing. Are you still confused about the future?
Global and Chinese markets of advanced X-ray inspection system (Axi) in PCB 2022-2028: Research Report on technology, participants, trends, market size and share
150 ppt! The most complete "fair perception machine learning and data mining" tutorial, Dr. AIST Toshihiro kamishima, Japan
Question d: Haffman coding
The first spring of the new year | a full set of property management application templates are presented, and Bi construction is "out of the box"
Dans la recherche de l'intelligence humaine ai, Meta a misé sur l'apprentissage auto - supervisé
AI 助力藝術設計抄襲檢索新突破!劉芳教授團隊論文被多媒體頂級會議ACM MM錄用
Fudan released its first review paper on the construction and application of multimodal knowledge atlas, comprehensively describing the existing mmkg technology system and progress
PTA tiantisai l1-079 tiantisai's kindness (20 points) detailed explanation
Dare to climb here, you're not far from prison, reptile reverse actual combat case
Yyds dry goods inventory hand-in-hand teach you the development of Tiktok series video batch Downloader
Problems and solutions of several concurrent scenarios of redis
Take you to master the formatter of visual studio code
FRP intranet penetration
Key knowledge of C language
A. Div. 7
Examination question bank of constructor decoration direction post skills (constructor) and examination data of constructor decoration direction post skills (constructor) in 2022