반응형
테이블 작성 시 MARIADB 오류 1064(42000)
테이블을 작성하려고 할 때:
MariaDB [heladeria]> create table sabores ('Id_sabores' int NOT
NULL,'sab_nombre' varchar(255) NOT NULL, 'calorias' varchar(255) NOT
NULL, PRIMARY KEY (Id_sabores));
다음의 에러가 표시됩니다.
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 ''Id_sabores' int NOT
NULL,'sab_nombre' varchar(255) NOT NULL, 'calorias' varchar' at line 1
작은따옴표('
)는 오브젝트(이 경우 컬럼) 이름이 아닌 문자열 리터럴을 나타내기 위해 사용됩니다.제거만 하면 됩니다.
create table sabores (
Id_sabores int NOT NULL,
sab_nombre varchar(255) NOT NULL,
calorias varchar(255) NOT NULL,
PRIMARY KEY (Id_sabores)
);
언급URL : https://stackoverflow.com/questions/40800310/mariadb-error-1064-42000-when-create-table
반응형
'programing' 카테고리의 다른 글
특정 유형의 모든 이벤트청취자 삭제 (0) | 2022.10.18 |
---|---|
CTE를 사용한 MariaDB 10.3.14 DELETE 스테이트먼트에서 구문 오류가 발생함 (0) | 2022.10.18 |
Python 스크립트에서 현재 git 해시를 가져옵니다. (0) | 2022.10.18 |
MySQL의 트리 구조 테이블을 한 번에 조회할 수 있습니까? (0) | 2022.10.18 |
os/path 형식에 관계없이 경로에서 파일 이름 추출 (0) | 2022.10.18 |