So you're getting the results from the database, make sure this is a result set. And you're patching these reserves using this query, select query. Okay? It's very simple. Now as you know, it's showing you the reserves, ascending order, because by default database management system use ascending order to show you the result for suppose if you want to show the reserves, descending order, or suppose you want to show fourth or fourth record on the top, so how can you do that? First of all, I'm saying so databases, that means it's showing us the database as you know, we have created the university database.
So now I'm saying use you use University database Ctrl, enter. So As, as you can see, it's using the GST database. Now I'm saying select static. from students table, you know that we have created the students table in the database. So now I'm executing this query, we have two ways to execute this query using data good, because we are using the data good tool. So this is the interface of the data to right click Execute query.
This is the first method. The second method is Ctrl and press the Enter button. Now Ctrl Enter to getting good results. Now I'm saying please show me the result set and descending order. So how can we do that? I'm saying THE ORDER BY clause SO THIS IS THE ORDER BY clause or this is the key word and now I'm saying order by Id s id DSDSC.
Now I'm saying, show me all the columns from students table. And I'm saying that please show me the order by s ID about this one. As you know, the shaggy is a fourth record. And now the third record is water. And the second record is okay, now and executing the query, we have two methods, you know, basically the two units using data grid, right click, press this button, or hold the Ctrl key and hit the enter button. As you know, it's showing us the result in descending order, but using it, okay, now, if I'm saying it, if I'm saying ascending order is C control in the first row.
By default, we have the same order. If I'm saying show me the results by city, by city, ascending order Ctrl F now as you see, it's showing the by city ascending order. So I record I and if I'm saying show me the results by descending order the ESC control intervals you can see you're showing us the results by descending order for the know the L L NT coming first, now the I entry second and I second I that means slower and this is India. So now USING THE ORDER BY clause, you can sort the results ascending or descending order So, everybody