Incorrect table definition; there can be only one auto column and it must be defined as a key auto_increment
테이블을 만들고 auto 넣으려고 했는데 오류가 뜬다
auto_increment 속성을 주는 컬럼은 항상 기본키로 지정되어야 한다
auto_increment 속성을 부여하는 컬럼에는 기본키 속성도 함께 지정해 주어야 한다 not null 속성은 주지 않아도 문법적으로 오류를 발생시키지는 않지만 기본키 속성은 오류를 발생 시킨다
하지만 id를 기본키로 설정하고 no도 기본키로 둘다 설정이 안되기 때문에
create table login(a int ,b int , primary key(a,b)); 로 한 테이블안에 고유키를 여러개 가질수 있다
mysql 레코트 가져오기 mysqli_fetch (0) | 2021.09.14 |
---|---|
View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them (2) | 2021.08.31 |
mysql 기본적인 명령어 select,alter,drop (0) | 2021.08.09 |
sql date 관련 DATETIME vs TIMESTAMP (0) | 2021.07.28 |
mysql alter (0) | 2021.07.21 |
댓글 영역