///
Search
🧑🏻‍💻

categorylist

목차

categorylist TABLE 컬럼 설명

컬럼명
Data Type
NOT NULL
Default
설명
키 여부
참조 테이블 & 컬럼
COUNT2

Table 생성 SQL 문

CREATE TABLE `sitedb`.`categorylist` ( study_id BIGINT(20) NOT NULL, tech_id BIGINT(20) NOT NULL, PRIMARY KEY (study_id, tech_id), FOREIGN KEY (study_id) REFERENCES study(id) ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY (tech_id) REFERENCES technologylist(id) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
SQL
복사

Query 예

study_id로 그에 속한 기술 목록 추출

select T.id,T.name,T.category from categorylist C inner join technologylist T on C.tech_id = T.id where C.study_id = (입력값);
SQL
복사

tech_id로 study 관련 정보들 추출

select S.id, S.title, S.user_id, S.maxman, S.nowman, S.create_date, S.place, S.warn_cnt from categorylist C inner join study S on C.study_id = S.id where C.tech_id = (입력값);
SQL
복사

고민중인 내용

~~