Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

place an existing column at first position in mysql [duplicate]

Tags:

mysql

please tell me how to place an existing column(contained values) at first position in mysql. Suppose i have a table EMP_DTLS and there are columns like NAME, SALARY, DOJ, DOB, EMAIL_ID, AND EMP_ID contains values in every columns. Now i want to place this EMP_ID at first position. enter image description here Thanks in advance.

I have tried the queries those are discussed here previously but those aren't working for me.

like image 545
pinto Avatar asked Nov 24 '13 19:11

pinto


1 Answers

ALTER TABLE EMP_DTLS MODIFY COLUMN EMP_ID INT(10) FIRST

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

like image 183
Mihai Avatar answered Oct 02 '22 20:10

Mihai