1. 程式人生 > >Oracle增刪改查--之增

Oracle增刪改查--之增

Oracle增刪改查--之增

Oracle增刪改查--之增

1、新建數據庫用戶並設置密碼 create user 用戶名 identified by 密碼
技術分享圖片

2、為新建用戶授權dba grant dba to 用戶名;
技術分享圖片

3、登陸驗證feiyu用戶 conn feiyu;
技術分享圖片

4、創建表(首先切到當前用戶下) create table 表名(id number(6)not null primary key,id_username char(4));
技術分享圖片

5、給chengji表添加數據 insert into 表名 values(‘2‘,‘wfy‘);
技術分享圖片

6、給cheng表下的id_username列創建名為cheng_index的標準索引

create index 索引名 on 表名(字段名); (字段名查看方式為第一截圖)
技術分享圖片
技術分享圖片

7、重建索引 alter index 表名 rebuild;
技術分享圖片

Oracle增刪改查--之增