DB/Oracle(DB)
-
INSERT<creat>DB/Oracle(DB) 2023. 7. 6. 15:11
/*INSERT INTO table_name(column name, column name) values ( )*/ INSERT INTO coffee_menu (coffee, kind, price) VALUES ('아메리카노','커피',2000); INSERT INTO coffee_menu (coffee, kind, price) VALUES ('카페라떼','커피',3000); INSERT INTO coffee_menu (coffee, kind, price) VALUES ('카푸치노','커피',3000); INSERT INTO coffee_menu (coffee, kind, price) VALUES ('그린티','논커피',3500); INSERT INTO coffee_menu (coffee, kind, pr..
-
connection & table 생성 <creat>DB/Oracle(DB) 2023. 7. 6. 14:36
CREATE TABLE coffee_menu ( no number GENERATED AS IDENTITY , coffee VARCHAR2(100) NOT NULL , /*VARCHAR2는 가변 길이를 의미(일반적으로 많이 씀)*/ kind VARCHAR2(100) NOT NULL , price number(11) DEFAULT 0 NOT NULL, /* 숫자타입 number */ reg_day date DEFAULT sysdate NOT NULL , /* 날짜타입 date */ mod_day date DEFAULT sysdate NOT NULL , CONSTRAINT pk_coffee_menu PRIMARY KEY(no) ) ; COMMENT ON TABLE coffee_menu IS '커피/음료 메뉴'..
-
user 생성<creat>DB/Oracle(DB) 2023. 7. 6. 13:29
-- 12C 버전부터 c## 이 생겨서, 이전 버전과 같이 사용하고자 아래 구문 실행 -- 자세한 내용은 - 구글링으로 아래 에러 검색 -- ORA-65096: 공통 사용자 또는 롤 이름이 부적합합니다. ALTER SESSION SET "_ORACLE_SCRIPT"=true; -- 이유는 모르겠지만, 첫번째 계정으로 scott / tiger 를 만들어야 할것 같은.. create user 사용할 id입력 identified by 사용할 비밀번호 입력; -- 접속 권한 부여 grant connect, resource to 사용할 id입력; -- 테이블스페이스 사용 권한 부여 alter user 사용할 id입력 quota unlimited on users;
-
-
-
-
-