Alter table to change the order
mysql>
mysql>
mysql> CREATE TABLE EmployeeS(
-> EmployeeNO INTEGER NOT NULL,
-> NAME CHAR(15) NOT NULL,
-> INITIALS CHAR(3) NOT NULL,
-> BIRTH_DATE DATE ,
-> SEX CHAR(1) NOT NULL,
-> JOINED SMALLINT NOT NULL,
-> STREET VARCHAR(30) NOT NULL,
-> HOUSENO CHAR(4) ,
-> POSTCODE CHAR(6) ,
-> TOWN VARCHAR(30) NOT NULL,
-> PHONENO CHAR(13) ,
-> LEAGUENO CHAR(4) ,
-> PRIMARY KEY (EmployeeNO) );
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> ALTER TABLE EmployeeS ORDER BY LEAGUENO DESC;
Query OK, 0 rows affected, 1 warning (0.01 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql>
mysql> drop table Employees;
Query OK, 0 rows affected (0.00 sec)
mysql>
Related examples in the same category