Nina-piaoye
我们有时会因为需要,而将筛选出来的数据创建成暂存表格,例如:我们可以将一个大表格中的不部分数据抽取出来,创建一个小的暂存表格,以便快速选取数据。一个暂存表格存储于暂存数据库tempdb之中,系统会在连接结束后自动清除它。
select a,b,c into productstemp from products

在SELECT语句中使用子查询

select * from distibutors where hsienshi_code=
(select hsienshi_code
from distributors
where boss_name=\'张江悦\')

select supp_name form tablename where a in
(select distinct supp_code
from products where descriptions=\'主机板\')

使用UNION运算符

SELECT statement1 UNION SELECT statement2
UNION会删除重复的记录

分类:

技术点:

相关文章:

  • 2021-11-11
  • 2021-11-01
  • 2021-08-05
  • 2021-11-01
  • 2021-12-05
  • 2021-11-01
  • 2021-11-01
  • 2021-11-09
猜你喜欢
  • 2021-11-01
  • 2021-08-29
  • 2021-12-27
  • 2021-11-01
  • 2021-08-29
相关资源
相似解决方案