Select specific or all columns

select * from 表名
select * from Student

select 列名,列名... from 表名
select name,age,email from Student

Distinct rows
select distinct 列名 from 表名
select distinct name from Student

Filtering with where clause(子句)
select * from Student where age>18

Wild Cards in SQL Server
Joining multiple conditions using AND and OR operators
select * from Student where age>18 and name like 'gester%' or gender=1

Sorting rows using order by
select name,email from Student 
order by name

Selecting top n or top n percentage of rows
select top 10 * from Student

Part 5 Select statement in sql server

相关文章:

  • 2021-07-10
  • 2021-11-23
  • 2021-11-25
  • 2021-07-28
  • 2022-01-03
  • 2021-05-24
  • 2021-06-09
猜你喜欢
  • 2021-06-21
  • 2021-10-04
  • 2021-09-24
  • 2022-01-08
  • 2022-01-21
  • 2021-08-12
相关资源
相似解决方案