|
||||
|
"ORDER BY Keyword"
The ORDER BY keyword sort the records in ascending order by default. If you want to sort the records in a descending order, you can use the DESC keyword. SELECT column_name(s) FROM table_name ORDER BY column_name(s) ASC|DESC |
|
|||
|
I have a little problem given below.
Select student.name, from student, staff where student.name= staff.name The result of this query gives only common name of both table student and staff table names but i want to common name of student and staff as well as all staff member name. So help me to write such a query. |
|
||||
|
Or if you want to extract just the records where names begin with a you remove the % character from the beginning of the query. Something like:
Code:
mysql_query("SELECT * FROM names WHERE name like 'A%' ORDER BY name");
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|