|
MySQL.RU - Webboard
Вернуться
Переименование столбца (Олег) 04/05/2012 - 18:10:44
Re: Переименование столбца (Akina) 05/05/2012 - 09:18:21
Re: Переименование столбца (Олег) 05/05/2012 - 14:29:01
From: Олег - 04/05/2012 - 18:10:44
Subject:Переименование столбца
-----------------
Не удается переименовать столбец
mysql> use cards
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from pet;
+------+-------------------+-------------+---------+-------+------+
| Sab | Address | Switchboard | Higtway | Local | Note |
+------+-------------------+-------------+---------+-------+------+
| 000 | corpus 1, room 13 | NULL | NULL | Pc495 | NULL |
+------+-------------------+-------------+---------+-------+------+
1 row in set (0.00 sec)
mysql> ALTER TABLE CHANGE Sab Sub;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHANGE Sab Sub' at line 1
mysql> ALTER TABLE CHANGE `Sab` `Sub`;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHANGE `Sab` `Sub`' at line 1
mysql> ALTER TABLE CHANGE `Sab` `Sub` TEXT;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHANGE `Sab` `Sub` TEXT' at line 1
mysql> ALTER TABLE CHANGE 'Sab' 'Sub' TEXT;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHANGE 'Sab' 'Sub' TEXT' at line 1
mysql> ALTER TABLE CHANGE Sab Sub TEXT;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHANGE Sab Sub TEXT' at line 1
mysql> ALTER TABLE cards CHANGE Sab Sub TEXT;
ERROR 1146 (42S02): Table 'cards.cards' doesn't exist
mysql> ALTER TABLE cards CHANGE Sab Sub;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
mysql>
Вроде перепробывал все что можно!
[Это сообщение - спам!]
Последние сообщения из форума
Уважаемые посетители форума MySQL.RU!
Убедительная просьба, прежде чем задавать свой вопрос в этом форуме, обратите внимание на разделы:
- ответы на наиболее часто задаваемые вопросы - FAQ
- раздел документация
- раздел поиск по сообщениям форума и документации
Также, старайтесь наиболее подробно указывать свою ситуацию (версию операционной системы, версию MySQL,
версию программного обеспечения, по которому возникает вопрос, текст возникающих ошибок, и др.)
Помните, чем конкретнее Вы опишете ситуацию, тем больше шансов получить реальную помощь.
41235
|
|