SQL Syntax Error for 5.5.35-MariaDB
I am getting the following error message when trying to run some sql code in my 5.5.35-MariaDB. Please can someone help me understand what is wrong?
SQL 구문에 오류가 있습니다. MariaDB 서버 버전에 해당하는 설명서에서 'CREATE TABLE IF EXISTEST' 근처에서 사용할 올바른 구문을 확인하십시오.
action_recorder
(id
1행의 int(11)NOT NULL AUTO_I'가 아니다.
My code is below:
CREATE TABLE IF NOT EXISTS `action_recorder` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`module` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`user_id` int(11) DEFAULT NULL,
`user_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`identifier` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`success` char(1) COLLATE utf8_unicode_ci DEFAULT NULL,
`date_added` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_action_recorder_module` (`module`),
KEY `idx_action_recorder_user_id` (`user_id`),
KEY `idx_action_recorder_identifier` (`identifier`),
KEY `idx_action_recorder_date_added` (`date_added`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=23 ;
Please can someone help me resolve this? Thanks!
닫는 괄호가 빠졌어요.맨 끝에 있는 것은 열쇠용입니다.idx_action_recorder_date_added
단, 테이블 정의 전체를 닫으려면 다른 테이블이 필요합니다.
Also, I think you shouldn't use those normal single quotes. They are for strings. Use backticks or omit them altogether.
'근접' 이후로.." " " " CREATE ... " 이 에러는CREATE
또는 그 바로 앞에 있는 것들도요.나는 후자에 투표한다--바로 앞에 무엇이 있는지 보라.
ReferenceURL : https://stackoverflow.com/questions/31392942/sql-syntax-error-for-5-5-35-mariadb
'programing' 카테고리의 다른 글
JavaScript 문자열에서 HTML 태그를 삭제하는 방법 (0) | 2022.10.23 |
---|---|
mysql 경고 해결 방법: "InnoDB: page_cleaner: 1000ms 의도 루프에 XXXms가 걸렸습니다.설정이 최적이 아닐 수 있습니다. (0) | 2022.10.23 |
컴포넌트의 useState에서 업데이터를 스테이트하기 위한 콜이 여러 번 발생하면 여러 번 재렌더가 발생합니다. (0) | 2022.10.23 |
Javascript 변수 유형을 얻는 더 좋은 방법? (0) | 2022.10.23 |
문자열로 표시되도록 전달된 JSON 열 - Larabel - Vuejs2 (0) | 2022.10.23 |