์๋ ์์ ๋ JMNote.com์ ์ํคํ์ด์ง์์ ๋ณต์ฌํด์จ ๊ฒ์์ ๋ฐํ๋๋ค.
( ์๋ณธ ์ฃผ์ -
)
์ค์ต ํ ์ด๋ธ ์์ฑ
CREATE TABLE employee ( emp_no NUMBER PRIMARY KEY, dept VARCHAR2 (16), name VARCHAR2 (32) ); INSERT INTO employee VALUES (130001, '์ธ์ฌ๋ถ', 'ํ๊ธธ๋'); INSERT INTO employee VALUES (130002, '์์ ๋ถ', '์๊บฝ์ '); INSERT INTO employee VALUES (130003, '์์ฐ๋ถ', '์ฅ๊ธธ์ฐ');
๋ณ๊ฒฝ ์
SELECT * FROM employee;
EMP_NO DEPT NAME 130001 ์ธ์ฌ๋ถ ํ๊ธธ๋ 130002 ์์ ๋ถ ์๊บฝ์ 130003 ์์ฐ๋ถ ์ฅ๊ธธ์ฐ
๋ณ๊ฒฝ
- ์ฌ๋ฐฐ์ด๋ ์ฌ๋ณธ ์์ฑ โ ์ฌ๋ณธ์ ์๋ณธ์ผ๋ก ๋์ฒด
CREATE TABLE temp AS SELECT emp_no, name, dept FROM employee; DROP TABLE employee; RENAME temp TO employee;
๋ณ๊ฒฝ ํ
SELECT * FROM employee;
EMP_NO NAME DEPT 130001 ํ๊ธธ๋ ์ธ์ฌ๋ถ 130002 ์๊บฝ์ ์์ ๋ถ 130003 ์ฅ๊ธธ์ฐ ์์ฐ๋ถ
'๐ป Programming > Oracle 11g' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
getString not implemented for class oracle.jdbc.driver.T4CBlobAccessor (0) | 2015.04.20 |
---|---|
ORA-00917: ๋๋ฝ๋ ์ฝค๋ง (0) | 2015.04.20 |
[ORA-02270] no matching unique or primary key for this column-list (0) | 2015.04.20 |
[SQL] Truncate vs Drop vs Delete (0) | 2015.04.20 |
[SQL] ๊ธฐ์กด ํ ์ด๋ธ์ ์ปฌ๋ผ์ not null ์ ์ฝ ์ถ๊ฐํ๊ธฐ (0) | 2015.04.20 |