본문 바로가기
반응형

MYSQL8

[MySQL] Error Code: 1452. Cannot add or update a child row: a foreign key constraint fails... 오늘의 에러 Error Code: 1452. Cannot add or update a child row: a foreign key constraint fails...  에러사항실습 문제 풀이 중 아래와 같이 에러가 발생했다.실습 문제)고객 ID가 5인 고객의 주소를 '123 New Address, New City'로 변경하시오.작성한 쿼리문)UPDATE customerSET address_id = CASE  WHEN (SELECT address_id FROM address WHERE address = '123 New Address, New City') IS NULL THEN 0    ELSE (SELECT address_id FROM address WHERE address = '123 New Addres.. 2025. 1. 22.
[MySQL] Error Code: 1093. You can't specify target table 'table_name' for update in FROM clause 악마같은 돌고래...오늘은 실습 하던 중 발생한 에러에 대해 정리하려 한다.  Error Code: 1093.You can't specify target table 'table_name' for update in FROM clause  에러사항작업환경 : MySQL Workbench실행코드 : DELETE FROM books WHERE sales = (SELECT MIN(sales) FROM books) SELECT문, INSERT문, UPDATE문 실습하면서 아주 착착 잘 진행되었는데DELETE문 실습하자마자 아래와 같은 에러가 발생했다. 에러내용 : Error Code: 1093. You can't specify target table 'Books' for update in FROM clause 에러.. 2025. 1. 21.
[Python-MySQL] RuntimeError: 'cryptography' package is required for sha256_password or caching_sha2_password auth methods와 pymysql.err.OperationalError: (1045, "Access denied for user 'park-yujin'@'localhost' (using password: YES)") 에러사항 1python에서 pymysql 작성 도중 아래와 같은 에러가 발생했다.코드는 별거 없었다. 그냥 connect 하는게 다였음...Traceback (most recent call last): ··· 생략 ···line 144, in sha2_rsa_encrypt raise RuntimeError( ...... ) RuntimeError: 'cryptography' package is required for sha256_password or caching_sha2_password auth methods  에러원인cryptography 라는 패키지가 필요하다는 것!!!  해결cryptography를 설치해 주면 끄읕!터미널에 아래와 같이 작성해주면 된다.pip install cryptography.. 2025. 1. 17.
반응형