ROW_NUMBER, RANK and DENSE_RANK excercise

Exercise
Correct!
False!
Assign a unique id to each row returned.
DECLARE @Table TABLE ( Col_Value varchar(2) ) INSERT INTO @Table (Col_Value) VALUES ('A'),('A'),('A'),('B'),('B'),('C'),('C'); SELECT Col_Value, code_here AS 'RowID' FROM @Table;

Exercise
Correct!
False!
Assign a unique number to each distinct row, but it leaves a gap between the groups.
DECLARE @Table TABLE ( Col_Value varchar(2) ) INSERT INTO @Table (Col_Value) VALUES ('A'),('A'),('A'),('B'),('B'),('C'),('C'); SELECT Col_Value, code_here AS 'RowID' FROM @Table;

Exercise
Correct!
False!
Assign a unique number to each distinct row, but not leave gaps between group
DECLARE @Table TABLE ( Col_Value varchar(2) ) INSERT INTO @Table (Col_Value) VALUES ('A'),('A'),('A'),('B'),('B'),('C'),('C'); SELECT Col_Value, code_here AS 'RowID' FROM @Table;

results matching ""

    No results matching ""