這幾天在學習使用IBATIS突然要使用模糊查詢,以及動態多個條件查詢,按照自己的想法試了很久,都沒解決這個問題.首先是模糊查詢的問題,開始時我使用如下條件:select * from user where name like '%#value#%'. 可是怎麼也不行,好像還報錯了.後來在網上找到瞭解決方法,就是使用$來代替#號.1>寫成: like '%$value$%' 就可以了,<!-- 模糊查詢不能用#,#是用prepareStatement的?插入參數,$是文本替換
由於資料庫伺服器的IP變更等問題,需要重建OEM,針對oracle 10g的基本過程。首先要知道執行個體名、連接埠,SYS的口令,然後進行以下步驟:1.更改DBSNMP的口令,清除舊的配置相關角色、使用者和同義字2.使用ecma命令重建配置資訊(emca -config dbcontrol db -repos recreate)3.檢查EM運行情況(emctl status dbconsole)4.通過新的em地址訪問管理頁面控制台的互動過程如下(黑體是注釋):Microsoft
/* 預存程序 參數類型: in 表示入參 out 表示出參 in out 表示既是入參又是出參 預設情況下是入參 注意: 預存程序的參數資料類型不需要指定精度 */ create or replace procedure pro_myjob(title in varchar2) is var_mytitle jobs.job_title%type; begin select j.job_title into var_mytitle from jobs j where
select * from employees emp where emp.salary = 3000 if語句 begin if (10>50) then dbms_output.put_line('da yu'); else dbms_output.put_line('bu da yu'); end if; end; select * from employees emp where emp.employee_id=119 where
select t.task_id as counts from tnm_task_info t where (t.is_valid = 2 and to_date(t.start_time, 'yyyy-mm-dd hh24:mi:ss') <= sysdate and t.start_time is not null) and (to_date(t.end_time, 'yyyy-mm-dd hh24:mi:ss') >= sysdate and
ArcGIS的ArcSDE10突然無法串連Oracle,提示有錯誤:經過查詢Google,得解決辦法:1、查看使用者的proifle是那個,一般是default: sql>SELECT username,PROFILE FROM dba_users; 2、查看指定概要檔案(如default)的密碼有效期間設定:sql>SELECT * FROM dba_profiles s WHERE s.profile='DEFAULT' AND resource_name='PASSWORD_
查看使用者串連斷掉某一串連查看串連iporacle中查看使用者串連select username,sid,serial#,status from v$session where username <>'1'; select sid,ses.serial#,ses.username,pro.username,pro.spid,status from v$session ses,v$process pro where ses.username='PRODUCT' and