Jump to content
php.lv forumi

Tabulā pārvietot kolonas


Settlers

Recommended Posts

Tip dota tabula:

 

+------+-------+------+
| col1 | col2  | col3 |
+------+-------+------+
| 3	| Three | NULL |
| 1	| One   | NULL |
| 2	| Two   | NULL |
+------+-------+------+

 

a kaa lai es vareetu visu kolonu piem col3 paarlikt priekshaa col1?

 

tip iznaakumam jaaiznaak:

 

+------+-------+------+
| col3 | col1  | col2 |
+------+-------+------+
| NULL | 3	 | Three|
| NULL | 1	 | One  |
| NULL | 2	 | Two  |
+------+-------+------+

 

 

kautko meegjinaaju ar sho:

 

ALTER TABLE Tabula MOVE col3 [bEFORE col1]

 

nekaa nesanaaca :D neesu prof MySQL komandaas.

 

izskridiiiju 30 min googlee par MySql... bet nekaa iipashu neatradu

 

izmantoju phpmyadmin MySQL

 

Cerams kaads var palīdzēt man, paldies

Edited by Settlers
Link to comment
Share on other sites

×
×
  • Create New...