SQL> select tname from tab; TNAME ------------------------------------------------------------ COUNTRIES DEPARTMENTS EMPLOYEES EMP_DETAILS_VIEW JOBS JOB_HISTORY LOCATIONS REGIONS member 9 rows selected. SQL> select * from member; select * from member * ERROR at line 1: ORA-00942: table or view does not exist SQL> SQL> conn / as sysdba Connected. SQL> grant select on hr.member to hr; grant select on hr.member to hr * ERROR at line 1: ORA-00942: table or view does not exist SQL> SQL> l 1 select owner, object_name, object_type ,status from dba_objects where object_name='member' 2* SQL> / OWNER OBJECT_NAME OBJECT_TYPE STATUS ---------- -------------------- -------------------------------------- -------------- HR member TABLE VALID SQL>
테이블 생성후 select 나 기타 명령어를 입력하였을때 ORA-00942애러가 발생합니다
sqldevelop상에서 보아도 정상적으로 테이블이 나오며 데이터 입력까지 되나 쿼리문을 날려보면 테이블이 존재하지 않는다는 애러가 발생합니다 한가지 걸리는점이 있다면 기존에 깔려있던 11g r2 익스프레스 버전을 오라클 DB 인스톨러로 제거한뒤 새로 설치했습니다. 무엇이 문제일까요 그리고 제가 알기로는 딕셔너리는 조회시 대문자로 조회해야하는걸로알고있는데 소문자로 조회해야 나오네요 ;; 대체 뭐가 문제인건지 모르겠네요
자문자답입니다 기존 테이블 생성쿼리가 아래인데 CREATE TABLE "HR"."member" ( "id" VARCHAR2(50 BYTE) NOT NULL ENABLE, "password" VARCHAR2(50 BYTE) NOT NULL ENABLE, "name" VARCHAR2(50 BYTE), "gender" VARCHAR2(10 BYTE), "birthday" DATE, "email" VARCHAR2(100 BYTE), "phone_num" VARCHAR2(50 BYTE), "addr" VARCHAR2(1000 BYTE), "reg_datge" DATE DEFAULT sysdate, CONSTRAINT "PK_MEMBER" PRIMARY KEY ("id") ) TABLESPACE "USERS" ; COMMENT ON COLUMN "HR"."member"."id" IS '아이디'; COMMENT ON COLUMN "HR"."member"."password" IS '비밀번호'; COMMENT ON COLUMN "HR"."member"."name" IS '이름'; COMMENT ON COLUMN "HR"."member"."gender" IS '성별'; COMMENT ON COLUMN "HR"."member"."birthday" IS '생일'; COMMENT ON COLUMN "HR"."member"."email" IS '이메일'; COMMENT ON COLUMN "HR"."member"."phone_num" IS '전화번호'; COMMENT ON COLUMN "HR"."member"."addr" IS '주소'; COMMENT ON COLUMN "HR"."member"."reg_datge" IS '등록일'; COMMENT ON TABLE "HR"."member" IS '회원가입';
이놈을
CREATE TABLE "HR"."MEMBER" ( "id" VARCHAR2(50 BYTE) NOT NULL ENABLE, "password" VARCHAR2(50 BYTE) NOT NULL ENABLE, "name" VARCHAR2(50 BYTE), "gender" VARCHAR2(10 BYTE), "birthday" DATE, "email" VARCHAR2(100 BYTE), "phone_num" VARCHAR2(50 BYTE), "addr" VARCHAR2(1000 BYTE), "reg_datge" DATE DEFAULT sysdate, CONSTRAINT "PK_MEMBER" PRIMARY KEY ("id") ) TABLESPACE "USERS" ; COMMENT ON COLUMN "HR"."MEMBER"."id" IS '아이디'; COMMENT ON COLUMN "HR"."MEMBER"."password" IS '비밀번호'; COMMENT ON COLUMN "HR"."MEMBER"."name" IS '이름'; COMMENT ON COLUMN "HR"."MEMBER"."gender" IS '성별'; COMMENT ON COLUMN "HR"."MEMBER"."birthday" IS '생일'; COMMENT ON COLUMN "HR"."MEMBER"."email" IS '이메일'; COMMENT ON COLUMN "HR"."MEMBER"."phone_num" IS '전화번호'; COMMENT ON COLUMN "HR"."MEMBER"."addr" IS '주소'; COMMENT ON COLUMN "HR"."MEMBER"."reg_datge" IS '등록일'; COMMENT ON TABLE "HR"."MEMBER" IS '회원가입';
이렇게 바꾸니 정상 실행됩니다 제가 알기로는 쿼리문 대소 구분을 안하는걸로 아는데 원인을 알수가 없네요 해결을 하기는 했는데 이찝찝함은 참 말로 표현할수없네요