Oracle PL/SQL可使用內建的LENGTH()函式取得字串(e.g. CHAR、VARCHAR2、NVARCHAR2、CLOB...)長度。
2024/11/24
2024/11/18
2021/6/29
Spring Data JPA NamedParameterJdbcTemplate Oracle 11g page query 分頁查詢範例
Spring Data JPA使用NamedParameterJdbcTemplate對Oracle 11g使用native sql做動態條件及分頁查詢範例。
2021/6/15
Oracle SQL Developer 欄位自動增量設定 column set auto increment
Oracle SQL Developer設定欄位自動增量(auto increment)的方式如下。
2021/3/8
Oracle 資料表分割 table partitioning
最近工作中碰到某資料表資料過多導致查詢效能低落,DBA計畫以資料表分割(partitioning)的方式來解決,才了解到原來資料庫還有這特別的功能。
2021/2/4
2020/12/21
Spring Data JPA Repository INSERT INTO SELECT WHERE NOT EXISTS
在Spring Data JPA的Repository使用INSERT INTO .. SELECT .. WHERE NOT EXISTS避免資料重覆新增。
2020/12/9
2020/10/10
2020/9/22
2020/9/19
2020/9/14
Oracle 找出限制條件資料表 find ORA-02292 constraint table
在Oracle異動資料表時,若發生
ORA-02292: 違反完整性限制條件 (<constraint_name>) - 發現子項記錄
ORA-02292: integrity constraint (<constraint_name>) violated - child record found
代表刪除的資料被外鍵參考,所以有外鍵的限制條件。應該先把參照的子表資料刪除後才能把主表的資料刪除。
透過<constraint_name>找出參照的資料表的方式如下。
2020/9/4
ORA-01008: 部份變數未被連結 not all variables bound
今天寫好久沒碰的PreparedStatement,結果執行時出現
ORA-01008: 部份變數未被連結錯誤。
2020/8/11
2020/8/10
2020/8/9
訂閱:
文章 (Atom)