Лабораторная работа: Новые операторы языка манипулирования данными (DML)

OUTER APPLY parf(parfum_id) as mro;


8) Функции ранжирования

select parfum_name,destination, price,Rank()

over (Partition BY destination order by price DESC)

as Rank

from Parfums

9) DENSE_RANK()

select parfum_name,destination, price,DENSE_RANK()

over (Partition BY destination order by price DESC)

as Rank

from Parfums


10) Row_Number()

select parfum_name,destination, price,Row_Number()

over (Partition BY destination order by price DESC)

as Rank

from Parfums

11) Ntile()

select parfum_name,destination, price, Ntile(3)

over (Partition BY destination order by price DESC)

as Rank

from Parfums


12) Оператор TOP

DECLARE @var1 AS int , @var2 AS int;

SET @var1=1;

SET @var2=2;

SELECT TOP (@var1*@var2) *

FROM Parfums;

13) Использование предложения TABLESAMPLE

SELECT *

К-во Просмотров: 307
Бесплатно скачать Лабораторная работа: Новые операторы языка манипулирования данными (DML)