增加資料
新增表的所有列的值
新增表的部分列字段的值insert
into 表名 values
(值1,值2,...
...)
新增查詢到表中的所有值insert
into 表名(列1,列2,...
...)
values
(值1,值2,...
...)
新增主鍵自增列insert
into 表2
select
*from 表1
修改資料insert
into 表名 values
(trim(to_char(序列號名稱.nextval,
'00000000'
),值2,...
...)
刪除資料update 表名 set 列名 =
'要改的值'
where 列名=
'條件值'
根據條件刪除
全表刪除delete
from 表名 where 列名 =
'值'
檢視資料truncate
table 表名
內連線
select
*from 表名1
inner
join 表名2
on 表名1.a=表名2.a
左連線select
*from 表名1,表名2
where 表名1.a=表名2.a
右連線select a.
*,b.
*from a left
join b on a.欄位名=b.欄位名
全連線select a.
*,b.
*from a right
join b on a.欄位名=b.欄位名
select a.
*,b.
*from a full
join b on a.欄位名=b.欄位名
Oracle資料庫 筆記2
oracle 建立檢視時 提示使用者許可權不足 問題 使用scott 登入oracle 以後,建立檢視,提示 許可權不夠 怎麼解決?回答 這是因為scott 這個帳戶目前沒有建立檢視的許可權。解決方法為 首先使用system 帳戶進行登入,其中 tigertiger 為安裝 oracle 時所指定的...
oracle資料庫知識筆記(1) 庫操作
直接登入 sqlplus指定使用者登入 sqlplus 使用者名稱 密碼 as sysdba建立表 create table 表名 列名1 number 2 primary key,列名2varchar 10 not null,新增字段 alter table 表名 add 欄位名 字段型別 def...
資料庫知識 oracle
總要學點新的東西 oracle i,g,c分別代表internet,網格計算方式,提公升了資料庫的分布,c指雲服務。個人學習使用不要錢,工作之中則需要繳費 超級管理員 sys change on install 普通管理員 system manager 普通使用者 scott tiger需要解鎖 大...