Place existing column in first position in mysql

tell me how to place an existing column (contained values) in the first position in mysql. Suppose I have an EMP_DTLS table and there are columns such as NAME, SALARY, DOJ, DOB, EMAIL_ID, and EMP_ID contains the values ​​in each column. Now I want to place this EMP_ID in the first position. enter image description here Thanks in advance.

I tried the queries that were discussed here earlier, but they do not work for me.

+6
source share
1 answer
ALTER TABLE EMP_DTLS MODIFY COLUMN EMP_ID INT(10) FIRST 

Just use the correct type, I used INT (10)

+10
source

Source: https://habr.com/ru/post/958735/


All Articles