Oracle's scott user data sheet

1. In the sqlplus command, if you want to view the data table, you can use:

select * from tab;
Insert picture description here

2. If you want to view the structure of each table, you can use:

desc 表名称;
Insert picture description here


3. [Common table relationship] There are four tables proposed under scott: department table (dpt), employee table (emp), salary grade table (salgrade), salary table (bonus)

  • According to the actual relationship: there will be multiple employee information under a department;

4. [Department table] desc dept;

Insert picture description here


Insert picture description here


Insert picture description here


5. [Employee table] desc emp;

Insert picture description here


Insert picture description here


Insert picture description here


6. [Salary grade] desc salgrade;

Insert picture description here


Insert picture description here


Insert picture description here


7. [Salary table] desc bonus;There is no data in this table;

Insert picture description here


Insert picture description here
  • Once you learn complex queries, you must master all the above table structures.