반응형

DB 74

방명록, 방명록 안의 댓글 DB 연결 | 2개의 DB 연결하기 (조인)

create table guest(num smallint auto_increment primary key, myid varchar(20), content varchar(2000), photoname varchar(50), chu smallint default 0, writeday datetime) create table answer (idx smallint auto_increment primary key, num smallint references guest(num) on delete cascade, myid varchar(20), content varchar(1000), writeday datetime) 왜 idx로 smallint를 하냐면 guest에 이미 num을써서. 겹치면 안되서 idx로 작성 ..

DB/mySQL 2022.04.23

mySQL cmd(도수창) 에서 create database sist; (데이터베이스 만들고) create table person (테이블만들기)

Microsoft Windows [Version 10.0.19044.1586] (c) Microsoft Corporation. All rights reserved. C:\Users\quddn>mysql -u root -p Enter password: **** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 Server version: 8.0.28 MySQL Community Server - GPL Copyright (c) 2000, 2022, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation an..

DB/mySQL 2022.03.29

mySQL 8 community (이게 조금더 심플한거) 다운받기

https://dev.mysql.com/downloads/mysql/ MySQL :: Download MySQL Community Server Select Operating System: Select Operating System… Microsoft Windows Ubuntu Linux Debian Linux SUSE Linux Enterprise Server Red Hat Enterprise Linux / Oracle Linux Fedora Linux - Generic Oracle Solaris macOS Source Code Select OS Version: All Windows (x86 dev.mysql.com 1. 이 사이트 들어가서 2. Go to Download Page > 클릭 3. 밑에있는..

DB/mySQL 2022.03.29

26. view (가상테이블) | or replace 는 같은 이름있을시 덮어씀

--조인, 외부키문제 --1. seq_food 1부터 3씩증가, 캐시0 create sequence seq_food start with 1 increment by 3 nocache; --2. 테이블: food...6개정도...제약조건은 알아서 줄것 ---------------------------------------------------------------------------------- --시퀀스(fno) 음식명(food) 가격(prince) 상호명(shop) 위치(loc) --1 스파게티 15000 소렌토 역삼동 --------------------------------------------------------------------------------- --부모테이블 create table ..

DB/오라클 SQL문 2022.02.24
반응형