当前位置:网站首页>Basic query
Basic query
2022-06-26 04:37:00 【Lili demon_】
Basic query
grammar :select Query list from Table name ;
Query list : Field 、 Constant values 、 expression 、 function
1. A single field in a query table
select last_name from employees;
2. Multiple fields in the query table
select last_name,salary,email from employees;
3. Query all fields in the table
select * from employees;
4. Query constant value 、 expression 、 function
SELECT 100;
SELECT 20%6 result ;
SELECT VERSION();
5. names
SELECT 20%6 AS result ;
SELECT 20%6 result ;
6. duplicate removal
SELECT DISTINCT employee_id FROM employees;
7. Join fields
SELECT CONCAT(last_name,first_name) AS full name FROM employees;
8. IFNULL
SELECT IFNULL(commission_pct,0) AS Bonus FROM employees;
# Selection field , If the value in the field is NULL Output custom content
边栏推荐
- Performance test comparison between PHP framework jsnpp and thinkphp6
- Report on demand situation and development trend of China's OTC industry from 2022 to 2028
- PHP design function getmaxstr to find the longest symmetric string in a string - [original]
- [H5 development] 01 take you to experience H5 development from a simple page ~ the whole page implementation process from static page to interface adjustment manual teaching
- numpy 随机数
- numpy 索引及切片
- 修改Oracle连接数
- Redis cache message queue
- Rdkit chemical formula molecular formula search
- How to use the configured slave data source for the scheduled task configuration class scheduleconfig
猜你喜欢
Multipass中文文档-远程使用Multipass
NPM installation tutorial
Alipay failed to verify the signature (sandbox test indicates fishing risk?) [original]
微软禁止俄用户下载安装Win10/11
[H5 development] 01 take you to experience H5 development from a simple page ~ the whole page implementation process from static page to interface adjustment manual teaching
08_SpingBoot 集成Redis
[Qunhui] Internet access + custom port
CDN with OSS acceleration
1.19 learning summary
Modify the number of Oracle connections
随机推荐
1.13 learning summary
Upload script file (one sentence back door) WAF bypass (PHP)
Laravel uses phpword to generate word documents
Motivational skills for achieving goals
#微信小程序# 在小程序里面退出退出小程序(navigator以及API--wx.exitMiniProgram)
Physical design of database design (2)
PHP syntax summary
mysql高级学习(跟着尚硅谷老师周阳学习)
Nabicat连接:本地Mysql&&云服务Mysql以及报错
Oracle 數據泵導錶
Database design (3): database maintenance and optimization
Mysql8.0 configuring my SQL in INI file_ mode=NO_ AUTO_ CREATE_ User can start
Use of better scroll
微软禁止俄用户下载安装Win10/11
Zhimeng CMS will file a lawsuit against infringing websites
Yapi cross domain request plug-in installation
Jenkins introduces custom jars
Add, delete, modify and query curd in PHP native SQL
Review of number theory
BACK-OFF RESTARTING FAILED CONTAINER 的解决方法