상세 컨텐츠

본문 제목

SQL Error [1075] [42000]: (conn=11) Incorrect table definition; there can be only one auto column and it must be defined as a key

공부✍/에러삽질

by 기며니 2023. 2. 11. 02:22

본문

728x90
728x90
create table TB_BOARD (
	BOARD_MASTER_ID		INT				not null					COMMENT '게시판ID'
	, BOARD_ID			INT				not null	auto_increment	COMMENT '게시글ID'
	, TITLE				VARCHAR(200)	not null					COMMENT '제목'
	, CONTENTS			TEXT			not null					COMMENT '내용'
	, PRIMARY KEY (BOARD_MASTER_ID, BOARD_ID)
) ENGINE=InnoDB DEFAULT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI;

 

create table TB_BOARD (
	BOARD_MASTER_ID		INT				not null					COMMENT '게시판ID'
	, BOARD_ID			INT				not null	auto_increment	COMMENT '게시글ID'
	, TITLE				VARCHAR(200)	not null					COMMENT '제목'
	, CONTENTS			TEXT			not null					COMMENT '내용'
	, PRIMARY KEY (BOARD_ID, BOARD_MASTER_ID)
) ENGINE=InnoDB DEFAULT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI;

 

https://stackoverflow.com/questions/27748045/incorrect-table-definition-there-can-be-only-one-auto-column-and-it-must-be-def

 

Incorrect table definition; there can be only one auto column and it must be defined as a key, but it is

I'm having this error when I try to create the table "subcategorias" in MySQL ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must be defined as a key ...

stackoverflow.com

 

728x90
728x90

관련글 더보기

댓글 영역