iT邦幫忙

0

[Dapper][Oracle] GLOBAL TEMPORARY TABLE Inert 問題

問題
Oracle DB 使用 Dapper
使用情境如下
1.db.Open()確定開啟
2.先塞資料進 temp_1
3.隨後select temp_1
4.得到結果0筆????


                IEnumerable<dynamic> results = null;

                db.Open();

                string sql = "insert into temp_1 (col_1) values('Test')";
                db.Execute(sql);

                string sql2 = "select * form temp_1";
                result = db.Query(sql2);

結果
GLOBAL TEMPORARY TABLE commit 方式被設定為

ON COMMIT DELETE ROWS NOCACHE; (只要commit就將資料除)

改成
ON COMMIT PRESERVE ROWS (在同一Sessin期間,資料是保存的)

即可。


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 則留言

我要留言

立即登入留言