日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

OTL翻译(9) --常量的SQL语句

發布時間:2023/11/30 数据库 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 OTL翻译(9) --常量的SQL语句 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
常量的SQL語句 一個沒有綁定變量的SQL語句、SQL語句塊或是存儲過程就被稱為常量的SQL語句。OTL通過一個靜態的函數來執行這樣的SQL語句。 例如: // static otl_cursor::direct_exec() otl_cursor::direct_exec(db, // connect object"create table test_tab(f1 int, f2 varchar(30))"); // create table otl_cursor::direct_exec(db, // connect object"drop table test_tab", // SQL statement or PL/SQL blockotl_exception::disabled // disable OTL exceptions,// in other words, ignore any// database error); // drop table// or otl_connect::direct_exec() db.direct_exec // connect object ("create table test_tab(f1 int, f2 varchar(30))"); // create table db.direct_exec // connect object ("drop table test_tab", // SQL statement or PL/SQL blockotl_exception::disabled // disable OTL exceptions,// in other words, ignore any// database error); // drop table// or otl_connect::operator<<(const char*) db<<"create table test_tab(f1 number, f2 varchar2(30))";try{db<<"drop table test_tab""; // SQL statement or PL/SQL block }catch(otl_exception&){// ignore a database error } otl_cursor是OTL的一個內部類。它是對direct_exec()函數的一個底層類。因為以后版本該類可能不再對外提供,所以不建議使用。 下面這個例子為direct_exe()返回結果值的例子: // static otl_cursor::direct_execlong rpc=otl_cursor::direct_exec(db, // connect object"delete from test_tab where f1>=95");cout<<"Rows deleted: "<<rpc<<endl;// or otl_connect:direct_execlong rpc=db.direct_exec // connect object("delete from test_tab where f1>=95");cout<<"Rows deleted: "<<rpc<<endl;

?

轉載于:https://www.cnblogs.com/fnlingnzb-learner/p/5903315.html

總結

以上是生活随笔為你收集整理的OTL翻译(9) --常量的SQL语句的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。