-
8 minute read
DBCP(DataBase Connection Pool)์ Bean์ ์ฌ์ฉํด ๋ฐ์ดํฐ ์กฐํํ๊ธฐ DB create database mydb; use mydb; create table memlist( uid char(10) primary key, upw char(10), uname char(10), num1 int, num2 int, uemail char(20), uphone char(20), zipcode char(10), address char(20), job char(10) ); insert into memlist values ('vidv', '1234', '๊น์คํ', 941125, 1234567, 'vjun@naver.com', '010-123-4567',...
Continue reading...
-
1 minute read
ROLLBACK, SAVEPOINT rollback : ์ฟผ๋ฆฌ ์คํ ์ทจ์ (์ง์ ์ commit์ด ์คํ๋ ์ง์ ๊น์ง) autocommit=0 ์ผ ๋๋ง ๊ฐ๋ฅ set autocommit = 1 : update, delete ์ฆ์ ์ ์ฉ ํ์ฉ set autocommit ํ ๋ฒ ์คํํ๋ฉด ๊ณ์ ์ ์ฉ SET AUTOCOMMIT = 0; UPDATE ...; ROLLBACK; savepoint : ๋ณ๊ฒฝ๋ ์ง์ ์ ์์น ์ ์ฅ, ์ ์ฅ๋ ์ง์ ๊น์ง ๋ณต๊ตฌ ๊ฐ๋ฅ SAVEPOINT...
Continue reading...
-
1 minute read
ALTER - ํ
์ด๋ธ ๊ด๋ฆฌ ํ
์ด๋ธ ์ด๋ฆ ๋ณ๊ฒฝ ALTER TABLE ๊ธฐ์กดํ
์ด๋ธ๋ช
RENAME ๋ฐ๊ฟํ
์ด๋ธ๋ช
; ํ
์ด๋ธ ์ปฌ๋ผ๋ช
๋ณ๊ฒฝ ALTER TABLE ํ
์ด๋ธ๋ช
CHANGE COLUMN ๊ธฐ์กด์ปฌ๋ผ๋ช
๋ฐ๊ฟ์ปฌ๋ผ๋ช
๋ฐ์ดํฐํ์
; ํ
์ด๋ธ ์ปฌ๋ผ ์ถ๊ฐ ALTER TABLE ํ
์ด๋ธ๋ช
ADD COLUMN ์ถ๊ฐํ ์ปฌ๋ผ๋ช
ํ
์ดํฐํ์
[constraint]; ํ
์ด๋ธ ์ปฌ๋ผ ์ญ์ ALTER TABLE ํ
์ด๋ธ๋ช
DROP COLUMN ์ญ์ ํ ์ปฌ๋ผ๋ช
; ์ฐธ์กฐ ๊ด๊ณ๊ฐ ์ค์ ๋ ์ปฌ๋ผ ์ญ์ : ON...
Continue reading...
-
1 minute read
create table customers( customerid char(10) primary key, name char(10) not null, email char(20) ); create table orders( num int primary key auto_increment, orderdate char(15) not null, customerid char(10), amount int not null ); insert into customers values ('A123', 'Alice', 'aceee@email.com'), ('j_mes_id', 'James', 'j_mes@email.com'), ('popo', 'Pauline', 'pol2@email.com'); insert into orders (orderdate,...
Continue reading...
-
7 minute read
DAO, DTO, DBCP๋? DBCP(DataBase Connection Pool) ์ฌ์ฉ, Bean ์์ด JSP์์ ๋ฐ๋ก ์คํ ํด ๋ฐ์ดํฐ ์กฐํํ๊ธฐ DB create database mydb; use mydb; create table memlist( uid char(10) primary key, upw char(10), uname char(10), num1 int, num2 int, uemail char(20), uphone char(20), zipcode char(10), address char(20), job char(10) ); insert into memlist...
Continue reading...