-- 創建人員表
create table employee(
emp_id number(18), --人員ID
lead_id number(18), -- 上級人員ID
emp_name varchar2(200), --人員名稱
salary number(10,2), --工資
dept_no varchar2(8) --部門型別 A/B
);
-- 插入下面 刻意打亂的資料
insert into employee values('1',0,'king','1000000.00','A');
insert into employee values('3',1,'arise','60000.00','A');
insert into employee values('2',1,'jack','50500.00','A');
insert into employee values('4',2,'scott','30000.00','A');
insert into employee values('6',3,'wudde','23000.00','A');
insert into employee values('5',2,'tiger','25000.00','A');
insert into employee values('3',1,'arise','60000.00','B');
insert into employee values('2',1,'jack','50500.00','B');
insert into employee values('4',2,'scott','30000.00','B');
insert into employee values('6',3,'wudde','23000.00','B');
insert into employee values('5',2,'tiger','25000.00','B');
insert into employee values('1',0,'king','1000000.00','B');
-- 【下面的資料不要插入】下面的是有序的父子關系資料,是期望的效果,也可以參考最終效果圖片
insert into employee values('1',0,'king','1000000.00','A');
insert into employee values('2',1,'jack','50500.00','A');
insert into employee values('3',1,'arise','60000.00','A');
insert into employee values('4',2,'scott','30000.00','A');
insert into employee values('5',2,'tiger','25000.00','A');
insert into employee values('6',3,'wudde','23000.00','A');
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/283969.html
標籤:開發
上一篇:請問怎么輸入資料