✅ 100% EASY || FAST 🔥|| CLEAN SOLUTION 🌟
IF THIS WILL BE HELPFUL TO YOU, PLEASE UPVOTE !\n\n# Code\n\n/* Write your PL/SQL query statement below */\nCREATE FUNCTION getNthHighestSalary(N IN NUMBER) RET
IF THIS WILL BE HELPFUL TO YOU, PLEASE UPVOTE !\n\n# Code\n```\n/* Write your PL/SQL query statement below */\nCREATE FUNCTION getNthHighestSalary(N IN NUMBER) RETURN NUMBER IS\nresult NUMBER;\nBEGIN\nSELECT  DISTINCT salary  INTO result FROM \n(SELECT salary,DENSE_RANK() OVER (ORDER BY salary DESC) R \nFROM  Employee) WHERE R = N;\nRETURN result;\nEXCEPTION\nWHEN NO_DATA_FOUND THEN\nRETURN NULL;\nEND;\n```\n![5kej8w.jpg](https://assets.leetcode.com/users/images/7933690f-2a91-46ea-a242-bd59a8412075_1690471570.3773673.jpeg)\n
['Database', 'Oracle']