Oracle Second SET sequence

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.