DML statement and table join Cartesian Product: (1992) SQL> select ename, dname from emp, dept; (1999) SQL> select ename, dname from emp cross join dept; query the same number in the middle of emp and dept: SQL> select ename, dname from emp, dept where emp. deptno = dept. deptno; SQL> select ename, dname from emp join dept on (emp. deptno = dept. deptno); SQL> select ename, DNA m from emp join dept using (deptno); query the salary level; SQL> select ename, grade from emp e join salgrade s on (e. sal between s. losal and s. hisal); SQL> select ename, dname, grade from emp ejoin dept d on (e. deptno = d. deptno) join salgrade s on (e. sal between s. losal and s. hisal) where ename not like '_ A %'; query the manager of each employee: SQL> select e1.ename, e2.ename from emp e1 join emp e2 on (e1, mgr = e2.mgr ); outer join: left join: SQL e1.ename, e2.ename from emp e1 left join emp e2 on (e1.mgr = e2.mgr); right join: SQL> select ename, dname from emp e right outer join dept d on (e. deptno = d. deptno); full join: SQL> select ename, dname from emp e full join dept d on (e. deptno = d. deptno); Simple connection: SQL> select e1.ename, e2.ename from emp e1 left join emp e2 on (e1.mgr = e2.empno); DML statement select to query existing data: insert data into the data table: update modify the statement in the existing database: delete the data in the database; only the super administrator can add the user: conn sys/*** as sysdba; (delete a user) drop user xiaoming cascade; 1. backup scott (back up data related to scott users) exp import scott data to a new user; 2 create a new user: create user xiaoming identified by xiaoming default tablespace usersquota 10 M on users; grant permissions to users: grant create session, create table, create view to xiaoming; 3 import the data rollback (rollback to the previous operation); Back up the emp table: create table emp2 as select * from emp; insert data in dept2: insert into dept2 values (50, 'game', 'bj '); insert the data of the Department field: insert into dept2 (deptno, dname) values (60, 'game2 '); insert a table from the subquery, but the two tables have the same structure: insert into dept2 select * from dept; update application: update emp2 set sal = sal * 2, ename = ename | '-' where deptno = 10; select ename, sal from emp2 where deptno = 10; delete applications: delete from emp2; delete from dept2 where deptno; rollback