当前位置:网站首页>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 .
边栏推荐
- 请指教在线开户是什么意思?另外想问,现在在线开户安全么?
- Solr基础操作15
- Cloner un Graphe non recté [bfs accède à chaque bord et pas seulement aux noeuds]
- vlog常用参数解析
- Embedded development: Hardware in the loop testing
- 【UITableView】坑一:tableView:heightForHeaderInSection:方法不执行
- 代码分析平台 SonarQube 实战
- vsftp 与 TFTP 与 samba 与 nfs 复习
- [Shangshui Shuo series] day 8
- Inspiration collection · evaluation of creative writing software: flomo, obsidian memo, napkin, flowus
猜你喜欢

数据中台的五个关键要素

Introduction to reptiles: data capture of Betta barrage, with 11 introductory notes attached

Project 1: deploy lamp ECSHOP e-commerce platform

What is IGMP? What is the difference between IGMP and ICMP?

QT learning 02 GUI program example analysis

After 8 years of polishing, "dream factory of game design" released an epic update!

QT learning 06 widgets and window types
![多数元素II[求众数类之摩尔投票法]](/img/8f/5925f97c0f5f8c50c19a9ef6d7723c.png)
多数元素II[求众数类之摩尔投票法]

Leetcode (76) -- Minimum Covering substring

QPainter的使用入门:绘制象棋界面
随机推荐
漫画安全HIDS、EDR、NDR、XDR
Serialization of binary tree 297 Serialization and deserialization of binary tree 652 Find duplicate subtrees
New titanium cloud service won the "2022 love analysis · panoramic report of it operation and maintenance manufacturers" cloud management platform CMP representative manufacturer
Construction of module 5 of actual combat Battalion
What is flush software? Is it safe to open an account online?
Activity invitation | the Apache Doris community essay and speech solicitation activity has begun!
Set up enterprise NTP time server
Root cause of glideexception: failed decodepath{directbytebuffer- > gifdrawable- > drawable}
Stack space of JVM
The role of VMware virtual machine
8 software engineering environment
Vulnhub target -moriartycorp
vlog常用参数解析
Clone undirected graph [bfs accesses each edge but not only nodes]
Events in JS
[advanced C language] address book implementation
Solr基础操作13
Introduction to reptiles: data capture of Betta barrage, with 11 introductory notes attached
Solr基础操作8
MySQL:SQL概述及数据库系统介绍 | 黑马程序员