반응형

Oracle 7

Oracle tip

오라클 쿼리 팁 ◆ DB에 있는 모든 Table 이름보기 select table_name from user_tables ◆ Table의 Primary Key 찾기 select * from user_ind_columns where table_name = ''CodeTable'' ◆ 인수전달 select * from user_ind_columns where table_name = ''&1'' ===>; save key SQL> start key CodeTable ◆ 서로 연결되는 Key를 찾는 방법 select constraint_name, constraint_type, r_constraint_name from user_constraints where table_name = ''TABLE_NAME ◆ TAB..

Computer(IT)/Oracle 2011.01.20

오라클 특정 목적을 위한 참고 쿼리문

-- 질의 탐색을 위해 사용될 둘이상의 표현식을 지정 select prod_name 상품, prod_sale 판매가 from prod where prod_sale in (150000, 170000, 330000); --범위내의 모든 값을 탐색 select prod_name 상품, prod_sale 판매가 from prod where prod_sale between 100000 and 300000; -- 두 문자열을 연결하여 반환 select concat('My Name is', mem_name) from member; -- 대소문자 구분 lower(소문자), upper(대문자), initcap(첫글자만대문자) select lower('DATA manipulation Language') "lower", u..

Computer(IT)/Oracle 2011.01.20