I have a table with these values.
I want to query this table with limit of 5 but i want total row always to be part of resultset.
Table Description:
id desc value
1 A 100
2 B 200
3 C 300
4 D 400
5 E 500
6 F 600
7 G 700
8 H 800
9 I 900
10 Total 1000
i want to know whether its possible.
That’s a little messy in a single query. Maybe you can use a UNION query:
This will yield 5 rows from the table and a ‘Total’ row under.