I want to sort a table 'Employee' by a column name 'EmpID' and have those changes persistent.
Here is my Employee Table. 'EmpID' is the primary Key.
EmpID EmpName City
Ram 234 HYD
Shyam 130 BLR
Madan 894 KAN
Ramesh 101 CHN
So I wrote a a sql query
Select * FROM Employee ORDER BY EmpID ASC;
EmpID EmpName City
Ramesh 101 CHN
Shyam 130 BLR
Ram 234 HYD
Madan 894 KAN
but it only produces the resultSet in sorted format but the real table doesn't get change permanently.
Now when i run Select * FROM Employee, I get the original table again and not the updated table.
Select * FROM Employee;
EmpID EmpName City
Ram 234 HYD
Shyam 130 BLR
Madan 894 KAN
Ramesh 101 CHN
so how this can be done ?