drop table ENROL; drop table STUDENT; drop table COURSE; create table STUDENT ( sno number(3) primary key, sname nvarchar2(4) constraint sname_always_exists not null, year number(1) default 1, dept nvarchar2(5), unique (dept, sname), constraint year_check check (year >=1 and year
drop table ENROL; drop table STUDENT; drop table COURSE; create table STUDENT ( sno number(3) primary key, sname nvarchar2(4) constraint sname_always_exists not null, year number(1) default 1, dept nvarchar2(5), unique (dept, sname), constraint year_check check (year >=1 and year
CREATE OR REPLACE PROCEDURE print_hello(p in nvarchar2) IS BEGIN DBMS_OUTPUT.PUT_LINE('Hello World!'||p); --System.out.println("Hello World"+p) 과 유사한 기능을 가진다. -- "Hello World"+p => String concatenation END; / SET SERVEROUTPUT ON EXECUTE print_hello('홍길동'); -- 이것은 프로시저가 DBMS에 저장되어 있고 이 내용을 호출하여 붙여서 나옴 select *from USER_SOURCE; select *from student; --학과별로 학생의 인원을 계산해서 ST_DEPT 테이블에 기록 delete st_de..