Basic syntax for user authorization: Grant permissions/role to username; Master2. Switch usersSwitch User basic syntax: Connect user name/password; Master3, xiaoming Change passwordChange Password basic syntax: password user name;Admin Change
/*oracle user Lock, database lock sometimes compared to eat resources, if a large number of resources consumed, then other applications will not have the resources to use, it will be abnormally closed or unable to open. When Oracle has a lock
Resources:http://docs.oracle.com/database/122/SQLRF/ROWNUM-Pseudocolumn.htm#SQLRF00255http://blog.csdn.net/u010395242/article/details/52047341In the following manner:SELECT * from(SELECTRow_.*, RowNum rownum_ from(SELECT *
Use of the CONTAINS function in Oracle 1. Find a student's address in BeijingSELECT Student_id,student_name from Students WHERE CONTAINS ' Beijing ' )Remark:beijing is a word that is enclosed in single quotation marks.2. Check the student's address
When Oracle performs some DML operations, it has the flag of the active transaction on the Oracle block, if a transaction commits, because some blocks have been written back to DataFile before commit, or if the transaction affects too many blocks,
A table connection is required for multiple table queriesConnection can be divided into: (self-Baidu)Cross Join (Cartesian product of the digital logic, no explanation)Equivalent connectionFor example: SELECT * from T_a, t_b where t_a.xx = t_b.xxNo
Today in PL/SQL operation accidentally deleted some of the table data, this can frighten the ape, so quietly open the computer, hurriedly find Niang help. After the mother's small reptile help, a few minutes to restore the data.So how do I recover
Select Ename,hiredate,sysdate from Scott.emp; can find out the date of employee's entry to presentSelect Ename,sysdate-hiredate from Scott.emp; See how many days the employee has been in service;Select Ename,months_between (sysdate,hiredate) from
View Buffer command: ListExecute save 1.sql can be saved by the buffer command.Execution @1.sql can execute the saved content;Show feedback Displays the feedback information, the last line.Show Echo onShow ArraySize 5000 View the number of rows for
Function: Used to return specific data, functions can be executed directly in the SQL statement, including return for data manipulation, and return a separate function valueStored procedures: Used to complete a specific task (business of the program)
Common functions:• Statistics: Count (), returns the result based on the actual amount of data in the table;• Sum: Sum (), which is a statistic for numbers, sums• Average: Avg (), various data types support• Max: Max (), various data types support•
Oracle implicit parameter modification and viewingAlter system set "_allow_resetlogs_corruption" =false scope=spfile sid= ' * ';Col name for A30;Col value for A10;SelectX.KSPPINM name,Y.KSPPSTVL value,Y.KSPPSTDF IsDefault,Decode (Bitand (y.ksppstvf,7
SQL Code--Delete empty tablespace, but no physical fileDrop Tablespace tablespace_name;--Delete non-empty table spaces, but not physical filesDrop tablespace tablespace_name including contents;--Delete empty table space, including physical filesDrop
The Oracle tutorial you are looking at is: Renaming the foreign key for Oracle system tables.The foreign key of a table in Oracle is a means of guaranteeing system referential integrity, whereas referential integrity refers to a constraint
AWR reportThe AWR report is a performance collection and analysis tool provided by Oracle 10g and above that provides a report of the overall system resource usage over a period of time, through which we can understand the entire operation of the
--insert a record into the tableCreate or Replace procedurepro_insertdept isbegin Insert intoScott.deptValues(' the','Dog','Dog'); Commit; Endpro_insertdept;--Executionbeginpro_insertdept; End;--define three input parameters, insert a recordCreate
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