programing

SQL Syntax Error for 5.5.35-MariaDB

randomtip 2022. 10. 23. 12:44
반응형

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(id1행의 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

반응형