테스트 사이트 - 개발 중인 베타 버전입니다

ALTER TABLE....deault값 0으로 필드 추가 시 에러나는데요~~ 채택완료

더블피디 7년 전 조회 2,157

default 0으로 필드 추가하려합니다. 

계속 에러나서...

 

ALTER TABLE g5_member

ADD `enpro` int(11) NOT NULL default '0' AFTER `mb_10` ;

 

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ADD 'enpro` int(11) NOT NULL default '0' AFTER `mb_10`' at line 1

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트
늘맑음
7년 전

</p>

<p><a href="<a href="http://192.168.0.56/phpMyAdminS/url.php?url=https://dev.mysql.com/doc/refman/5.5/en/alter-table.html" target="_blank" rel="noopener noreferrer">http://192.168.0.56/phpMyAdminS/url.php?url=https://dev.mysql.com/doc/refman/5.5/en/alter-table.html</a>" target="mysql_doc">ALTER</a> <a href="<a href="http://192.168.0.56/phpMyAdminS/url.php?url=https://dev.mysql.com/doc/refman/5.5/en/alter-table.html" target="_blank" rel="noopener noreferrer">http://192.168.0.56/phpMyAdminS/url.php?url=https://dev.mysql.com/doc/refman/5.5/en/alter-table.html</a>" target="mysql_doc">TABLE</a> `g5_member` ADD `enpro` <a href="<a href="http://192.168.0.56/phpMyAdminS/url.php?url=https://dev.mysql.com/doc/refman/5.5/en/numeric-types.html" target="_blank" rel="noopener noreferrer">http://192.168.0.56/phpMyAdminS/url.php?url=https://dev.mysql.com/doc/refman/5.5/en/numeric-types.html</a>" target="mysql_doc">INT</a>(11) <a href="<a href="http://192.168.0.56/phpMyAdminS/url.php?url=https://dev.mysql.com/doc/refman/5.5/en/logical-operators.html#operator_not" target="_blank" rel="noopener noreferrer">http://192.168.0.56/phpMyAdminS/url.php?url=https://dev.mysql.com/doc/refman/5.5/en/logical-operators.html#operator_not</a>" target="mysql_doc">NOT</a> NULL <a href="<a href="http://192.168.0.56/phpMyAdminS/url.php?url=https://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html#function_default" target="_blank" rel="noopener noreferrer">http://192.168.0.56/phpMyAdminS/url.php?url=https://dev.mysql.com/doc/refman/5.5/en/miscellaneous-functions.html#function_default</a>" target="mysql_doc">DEFAULT</a> '0' AFTER `mb_10`;</p>

<p>

phpmyadmin으로 직접 추가한 위 구문은 정상입니다만... 확인해 보세요~

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

더블피디
7년 전
defult ...대문자 사용여부도 체크되나요?

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인