当前位置:网站首页>Several simple queries of SQL Server database
Several simple queries of SQL Server database
2022-06-30 00:15:00 【Little brother】
In the case of a large number of database files , To find a piece of information more clearly and quickly , Here are some examples 3 Kind of SQL Query methods :
1、 Projection query
2、 Select query
3、 Sort query
The following is the database table for testing Table:

The first is projection query , In order to make the viewed data more explicit , Understandability .
There are three ways to write projection queries :
① select CID Customer number ,CContact Contacts ,CPhone contact number ,CIntegration integral from Table
② select CID AS Customer number ,CContact AS Contacts ,CPhone AS contact number ,CIntegration AS integral from Table
③ select Customer number =CID, Contacts =CContact, contact number =CPhone, integral =CIntegration from Table
Projection query result :

Secondly, select query , In order to accurately find the data content of the condition .
select * from Table where CIntegration<=24 and CPhone like '%244575%'
% Represents a string of arbitrary length
Select query score less than 24 And the phone number is 244575 The data result of :

Finally, the sorting query , In ascending and descending order .
select * from Table order by CIntegration desc
desc: Descending ,asc: Ascending , The default is ascending
Sort query results :

This is it. SQL Server Database 3 A simple query method .
边栏推荐
- Code analysis platform sonarqube actual combat
- About mongodb error: connecting to: mongodb://127.0.0.1:27017/?compressors=disabled &gssapiServiceName=mongodb
- JVM之栈空间
- Some specifications based on zfoo development project
- 自动融合,驰骋海外丨跨境电商YescomUSA携手云扩实现一站式自动化服务
- Preliminary syntax of JS
- golang7_ TCP programming
- Analysis of common vlog parameters
- 将日志文件存储至 RAM 以降低物理存储损耗
- Andorid source build/envsetup. SH details to know
猜你喜欢

MySQL functions and constraints
![[Shangshui Shuo series] day 8](/img/66/2aaa82f122612db1775bdd45556d97.png)
[Shangshui Shuo series] day 8

Siemens low code platform connects MySQL through database connector to realize addition, deletion, modification and query

蛇形矩阵(数组模拟方向, d代表转弯)

Project 1: deploy lamp ECSHOP e-commerce platform

代码分析平台 SonarQube 实战

Quick Pow: 如何快速求幂

Halcon practical: design idea of solder joint detection

西门子低代码 9.14版本: 满足不同需求

Exploration and Practice on the future direction of byte cloud database
随机推荐
Analysis of common vlog parameters
Cloner un Graphe non recté [bfs accède à chaque bord et pas seulement aux noeuds]
JS draw polar color gradient
Leetcode (633) -- sum of squares
Solr基础操作14
JS绘制极坐标颜色渐变
Quick Pow: 如何快速求幂
Andorid source build/envsetup. SH details to know
Leetcode (76) -- Minimum Covering substring
Copy linked list with random pointer [space for time --hash record]
js中的事件
vsftp 与 TFTP 与 samba 与 nfs 复习
Solr basic operation 10
Three postures of anti CSRF blasting
How to realize the spelling correction function in search engine
Do mysqlcdc data not support windowing functions like row_ Number, lead
Basic operations such as MySQL startup under Windows platform
JS的初步语法
Solr基础操作7
克隆无向图[bfs访问每条边而不止节点]