◆Oracle查詢使用者資料表空間:select * from user_all_tables ◆Oracle查詢所有函數和儲存過程:select * from user_source ◆Oracle查詢所有使用者:select * from all_users.select * from dba_users ◆Oracle查看目前使用者串連:select * from v$Session ◆Oracle查看目前使用者許可權:select * from
先看看錶中的內容select name,pass from t1;2.方法一--使用decode函數select name,decode(pass,'pass111','密碼1','pass222','密碼2','','密碼為空白') from t1;注意:decode函數中如果你沒列出可能的情況,他就預設為空白3.方法二--使用nvl函數select name,nvl(pass,'密碼為空白') from t1;nvl函數只對查詢為空白的情況賦值4.方法三--使用case xxx
--異常測試declarev_ename emp.empno%type;--定義變數beginselect ename into v_ename from emp where empno = &gno;dbms_output.put_line('名字:' || v_ename);exception when no_data_found then dbms_output.put_line('未找到');end;/pl/sql是什麼 pl/sql(procedural
//const_cast轉換符是用來移除變數的const或volatile限定符 #include <iostream>using namespace std;void func(const int &a){int b = const_cast<int &>(a);b++;cout << b <<endl;}int main(){int m=6;func(m);cout << m
假定有兩張表,A表和B表。A 表中有欄位ID 、 NAME ,B表中也有欄位ID、NAME。A表中的欄位NAME為空白,要將B表中的欄位NAME的值賦給A表。update a set a.name=(select b.name from b where a.id=b.id)在SQLPLUS中,用 desc tablename 在PL/SQL工具中,可以通過視圖user_tab_columns 查看 select * from user_tab_columns where table_name =
如下,表a是資料庫中已經存在的表,b是準備根據表a進行複製建立的表: 1、只複製表結構的sql create table b as select * from a where 1<>1 2、即複製表結構又複製表中資料的sql create table b as select * from a 3、複製表的制定欄位的sql create table b as select row_id,name,age from a where