I would like alter my table so that the table is sorted alphabetically
That's strange and doesn't happen that way. You should rather get the sorted/ordered data while doing a SELECT
statement using an ORDER BY
clause like below
select * from profession order by profession;
Again I would suggest, change you column name different than the table name. In your case, table name and column name both the profession
.
then reset my AUTO_INCREMENT Field (prof_id).
Not sure why you would want to reset the PK field; anyways you can do the same using an ALTER
statement like
ALTER TABLE profession AUTO_INCREMENT = 1;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.