본문 바로가기
728x90
반응형

mysql6

DB정보 검색 SQL 작업을 하다보면 DB의 정보들을 검색헤야하는 경우가 생긴다.AS-IS의 테이블정의서를 작성해야 할 떄도 있고 등등... 일일히 DB에 들어가서 보고 정리하지 말고 검색해서보자 참고) MySQL기준이다.  1. 테이블 리스트 정보확인SELECT @rownum := @rownum + 1 AS `No.`, TABLE_NAME AS `테이블명`, TABLE_COMMENT AS `테이블 코멘트`FROM INFORMATION_SCHEMA.TABLES, (SELECT @rownum := 0) rWHERE TABLE_SCHEMA = 'your_database_name'; -- 여기에 데이터베이스 이름 입력  2. 테이블 컬럼 정보확인SELECT ORDINAL_POSITION.. 2024. 10. 8.
[MySQL] DDL문 ALTER - 컬럼 추가, 수정, 삭제 아래와 같은 board테이블이 있다. desc board; 이 테이블의 컬럼구조를 변경하고 싶을 경우에는 ALTER를 사용한다. [ 추가 - ALTER ADD ] 형식 alter table [테이블명] add [컬럼명] [타입] [옵션]; 예제 EX01. 맨 뒤에 추가 alter table board add imgfile varchar(100) default 'none.gif'; EX02. 맨 앞에 추가 alter table board add imgfile varchar(100) default 'none.gif' first; EX03. 지정한 위치에 추가 alter table board add imgfile varchar(100) default 'none.gif' after content; [ 수정 - .. 2022. 12. 2.
[JSP] JDBC 데이터노출 필요한 사전 작업 테이블 생성 2022.11.22 - [Database] - [MySQL] 테이블생성, 사용해보기 [MySQL] 테이블생성, 사용해보기 2022.11.22 - [JSP] - [JSP] MySQL 설치 [JSP] MySQL 설치 https://www.mysql.com/ MySQL Over 2000 ISVs, OEMs, and VARs rely on MySQL as their products' embedded database to make their applications, hardware and appliances more competitive, bring them to ma jjh93.com JDBC연결 2022.11.22 - [JSP] - [JSP] mysql-connector-j-8... 2022. 11. 22.
[MySQL] update문에 에러가 날 때, Safe mode 해제 업데이트를 실행하려는데 이런 오류가 난다면 update member set phone='010-9999-9999' where userid='somi'; Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect. 해당 에러는 Safe Updates에 체크가 되어있는 경우 나타난다. 워크벤치에서 사용자의 실수를 줄이고자 안전모드를 걸어둔 것이다. Edit - Preferences를 선택 SQl Editor을.. 2022. 11. 22.
[MySQL] 테이블생성, 사용해보기 2022.11.22 - [JSP] - [JSP] MySQL 설치 [JSP] MySQL 설치 https://www.mysql.com/ MySQL Over 2000 ISVs, OEMs, and VARs rely on MySQL as their products' embedded database to make their applications, hardware and appliances more competitive, bring them to market faster, and lower their cost of goods sold. Learn More jjh93.com db확인 show database; db생성 create database mydb; mydb가 추가적으로 생성된 것을 확인 할 수 있다. db선.. 2022. 11. 22.
[MySQL] MySQL 설치 https://www.mysql.com/ MySQL Over 2000 ISVs, OEMs, and VARs rely on MySQL as their products' embedded database to make their applications, hardware and appliances more competitive, bring them to market faster, and lower their cost of goods sold. Learn More » www.mysql.com DOWNLOADS 클릭 MySQL Community (GPL) Downloads » 클릭 MySQL Installer for Windows 클릭 하단에 있는 431.7M 짜리 다운로드 No thanks, just start .. 2022. 11. 22.
728x90
반응형