Programme I: Direct Authorization Act
1. Log in with happyy2165, and then authorize
Grant SELECT on HAPPYY2165. STUDENT to Scott
2. Log in with Scott and use the following code to access the student table
SELECT * FROM Happyy2165.student
Mode two: Control by role
1. Custom role role_testy2165 Create role role_testy2165
2. Bind the query table's permissions and roles
GRANT Select on HAPPYY2165. STUDENT to role_testy2165
3. Assigning roles to users
Grant role_testy2165 to SCOTT
Revoke select on Happyy2165.student from SCOTT reclaim permissions
6. Unlocking the user
Alter user HR account unlock
7. Delete stuname, stuage column duplicate row (keep one row) retention number of the largest
SQL operator
Arithmetic +/-
Connection | | Connect two strings
Comparison
Logical AND OR
Collection
Union Merge Record
Connection query: Merging columns
UNION ALL
Intersect
Select from dual
--|| It's a holiday tomorrow, but homework.
Select ' Tomorrow Holiday ' | | ' But a lot of homework ' from dual
Select ' Your result of the operation is ' | | 5 from dual
SELECT Deptno
From Dept
INTERSECT--intersection (total content)
SELECT DISTINCT Deptno from emp
SELECT Deptno
9.SQL function
Single-line function
Select LOWER (' MR SCOTT MCMILLAN ') "lowercase"
From DUAL;
SELECT UPPER (' last_name ')
from dual;
SELECT initcap (' username ')
from dual;
Select CONCAT (' Begin ', ' last ') ' Job '
From dual
Oracle Second SET sequence