문제

I'm trying to pass my problem... namely I can't rename my table named "TABLE 12" which was imported. I got a response:

#1064 - 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 ''TABLE 12' TO categories' at line 1
도움이 되었습니까?

해결책

Use ` instead of ' to quote database/table/field-names in MySQL. e.g.:

RENAME TABLE `TABLE 12` TO `categories`

다른 팁

Use backticks on system related objects.

Assuming your table name is TABLE 12:

RENAME TABLE `TABLE 12` TO `categories`

Assuming your table name is 12:

RENAME TABLE `12` TO `categories`

Documentation

Try using the backtick symbol (`) instead of quotes (').

RENAME TABLE `TABLE 12` TO `Categories`
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top