Skip to content

Commit 47a11b4

Browse files
committed
remove test.c
1 parent 093f044 commit 47a11b4

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

database/NthHighestSalary/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,19 @@ s1;
102102
s2;
103103
end while[end_label]
104104
```
105+
106+
## Code
107+
```mysql
108+
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT
109+
BEGIN
110+
declare x int;
111+
set N = N - 1;
112+
set x = (select distinct Salary from Employee order by Salary desc limit N, 1);
113+
if isnull(x)
114+
then
115+
return null;
116+
else
117+
return x;
118+
end if;
119+
END
120+
```

database/NthHighestSalary/test.c

Whitespace-only changes.

0 commit comments

Comments
 (0)