標籤:Oracle:create table load( id char(200) not null, title varchar2(100) not null, time varchar2(100) not null, def1 varchar2(100), def2 varchar2(200), def3 varchar2(300), def4 varchar2(400), def5 varchar2(500), dr
標籤:同時在自己電腦上裝了oracle用戶端和伺服器,上次還能用呢,這次突然用不了.[[email protected] oracle]$ sqlplus scott/tigerSQL*Plus: Release 9.2.0.4.0 - Production on Mon Nov 24 11:06:50 2008Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.ERROR:ORA-01034:
標籤: 文章簡要的討論了in,exists 與 not in, not exists在使用中的問題,主要是關鍵字的選擇,SQL的最佳化*註:下面樣本都是用Oracle內建使用者的表,如果安裝Oracle時沒有選擇不安裝資料庫樣本表應該都會安裝的1、IN和EXISTSIN語句:SELECT *FROM hr.employees t1WHERE t1.employee_id IN ( SELECT t2.employee_id
標籤:oracle查詢使用者下的所有表select * from all_tab_comments -- 查詢所有使用者的表,視圖等select * from user_tab_comments -- 查詢本使用者的表,視圖等select * from all_col_comments --查詢所有使用者的表的列名和注釋.select * from user_col_comments -- 查詢本使用者的表的列名和注釋select * from all_tab_columns
標籤:with tmp as(select ‘1‘ id ,‘aa‘ name ,‘22‘ age from dual union allselect ‘2‘ id ,‘bb‘ name ,‘20‘ age from dual union allselect ‘3‘ id ,‘CC‘ name ,‘21‘ age from dual)select a.*, lead(age,1) over (order by id desc) lag, a.age - lead(age,1)