下面SQL 中的;with 为什么一定要加上':with'呢,起什么作用呢.
来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:英语作业 时间:2024/07/07 01:55:44
下面SQL 中的;with 为什么一定要加上':with'呢,起什么作用呢.
;with
digits (i) as(--set up a set of numbers from 0-9
select i
from (VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9)) as digits (i))
--builds a table from 0 to 99999
,sequence (i) as (
SELECT D1.i + (10*D2.i) + (100*D3.i) + (1000*D4.i) + (10000*D5.i)
FROM digits AS D1 CROSS JOIN digits AS D2 CROSS JOIN digits AS D3
CROSS JOIN digits AS D4 CROSS JOIN digits AS D5)
select i,nchar(i) as character
from sequence
where i between 48 and 122 --vary to include any characters
--in the character set of choice
order by nchar(i) collate Latin1_General_bin --change to the collation you
--are trying
GO
;with
digits (i) as(--set up a set of numbers from 0-9
select i
from (VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9)) as digits (i))
--builds a table from 0 to 99999
,sequence (i) as (
SELECT D1.i + (10*D2.i) + (100*D3.i) + (1000*D4.i) + (10000*D5.i)
FROM digits AS D1 CROSS JOIN digits AS D2 CROSS JOIN digits AS D3
CROSS JOIN digits AS D4 CROSS JOIN digits AS D5)
select i,nchar(i) as character
from sequence
where i between 48 and 122 --vary to include any characters
--in the character set of choice
order by nchar(i) collate Latin1_General_bin --change to the collation you
--are trying
GO
SQL 语句里面的 with
是使用在 CTE 上面的
CTE(Common Table Expression) ,即公用表表达式,可以认为是在单个 SELECT、INSERT、UPDATE、DELETE 或 CREATE ⅥEW 语句的执行范围内定义的临时结果集.CTE 与派生表类似,具体表现在不存储为对象,并且只在查询期间有效.与派生表的不同之处在于,CTE 可自引用,还可在同一查询中引用多次.
是使用在 CTE 上面的
CTE(Common Table Expression) ,即公用表表达式,可以认为是在单个 SELECT、INSERT、UPDATE、DELETE 或 CREATE ⅥEW 语句的执行范围内定义的临时结果集.CTE 与派生表类似,具体表现在不存储为对象,并且只在查询期间有效.与派生表的不同之处在于,CTE 可自引用,还可在同一查询中引用多次.
下面SQL 中的;with 为什么一定要加上':with'呢,起什么作用呢.
he was fully acquainted with this story这句话里面的with是起什么作用呢? 是固
起什么作用呢?
这个电路图中的100K电阻是起什么作用的?为什么要100K呢
祈祷起什么作用呢
can I help you with the pancakes?with在这起什么作用,为什么要用with连接
jones is with his family琼斯先生和他的家人 这里可不可以用and 为什么一定要用 with呢
who's the woman with the black dress中的with 为什么不用in呢?
请问"To be content with little is true happiness"中的BE起什么作用?.
我想请问下面一个句子的前半截是表示什么?伴随?为什么是with开头呢?还可以怎么表达呢?
汽车镀膜起什么作用的呢?
这个.是什么?起什么作用呢