Difference between revisions of "Move mysql column"

From Conservapedia
Jump to navigation Jump to search
(This command will move your id column to the first position in a MySQL table)
 
m (→‎See also: clean up)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
alter table donors modify `id` int(10) unsigned NOT NULL AUTO_INCREMENT first;
+
To move a [[MySQL]] column, use this command: alter table tablename modify `columnname` int(10) unsigned NOT NULL AUTO_INCREMENT first;
 +
 
 +
==See also==
 +
[[DBMS]]
 +
[[Category:Computer tips]]

Latest revision as of 15:07, June 23, 2016

To move a MySQL column, use this command: alter table tablename modify `columnname` int(10) unsigned NOT NULL AUTO_INCREMENT first;

See also

DBMS