10
Answers

how to display top 5 records in the table using function.

Photo of HARDIK BHAVSAR

HARDIK BHAVSAR

11y
1.3k
1
how to display top 5 records in the table using function.?

i used this query but this query is not wrok on funtcion.
select top 5 * from tablename

using this function only 1 record are display.

alter function fn_TopStudentRecord  
(@name varchar(20))  
returns varchar(20)  
begin   
return (select name from Student1 where name=@name)  
end  

Answers (10)