In the development process, often encountered a number of tests, this time will want to understand the process of testing, and then based on the process to analyze the code is wrong, in this case, you need to use a custom exception, you need to know
Plsql Connect Oracle Database ora 12154 error
Today encountered a problem, using Sqlplus can connect to the remote database, but the use of plsql but not connected, error "ORA-12154:TNS: Unable to resolve the specified connection identifier"
The
Table query:
Merge query: Use the Union keyword to remove duplicate rows that meet the criteria.
Copy Code code as follows:
Select Ename,sal,job from emp where sal > 2500 Union Select ename,sal,job from emp where job = ' MANAGER ';
Problem Description: When creating a view under Scott's user, error: Insufficient permissions.
(Other users, etc.)
Workaround :
Log on as a DBA user
[SQL]
Copy Code code as follows:
Sqlplus/as SYSDBA
Give Scott user permission to
Oracle has many locks, and the utility of various locks is not the same. Oracle row-level locks are highlighted below, and Oracle row-level locks lock only the rows that the user is accessing. Can better guarantee the security of the data.
If the
Similar to other database systems, Oracle string concatenation uses the "| |" string concatenation, which is used in the same way as the plus sign "+" in MSSQLServer.
For example, execute the following SQL statement:
Copy Code code as
1, UPDATE nowait Apply the following scenario: Query a data and open database transactions to it. If the current data for the query is not locked, the result is returned correctly and the current data is locked, if the current data for the query is
The content of this article• Software Environment• Simple demonstration of Oracle database concurrency causing row-level locksThis article provides a simple demonstration of row-level locks that are caused by concurrency for table primary keys.
There are two ways:
One is declaring a system cursor, one is declaring a custom cursor, and then the following action, the parameter type is
In out or out
(1) Declare a personal system cursor. Recommended
Copy Code code as follows:
Accidentally heard of the Oracle database snapshot, the word I had a listen to be stunned, do not know what this is, and then spent a little time to study the next, the following is my summary of learning through the network
Snapshots are primarily
First understand the concept of the scheme, and then understand the relationship between the scheme and the database.
Let's take a look at their definition:
Copy Code code as follows:
A
schema is a collection of the database
Oracle SQL execution Flowchart _sql execution process
First, the execution steps of the SQL statement:1 grammar analysis, the analysis of the syntax of the sentence is consistent with the norms, measuring the meaning of the expressions in the
Yesterday found in the program data analysis results are not, after the analysis, the original data is still, the value of the field is cumulative. Heart said, not Ah, is to regenerate records before the analysis of AH. Did you forget to delete it?
Mysql:
MySQL database implementation paging is relatively simple, providing a limit function. Generally, you just need to write directly to the SQL statement.The limit clause can be used to limit the amount of data returned by the SELECT statement.
Nonsense not to say more, directly to everyone to paste the key code, the specific code as follows:
Package com.sp.test;
Import java.sql.*;
Import java.util.*;
public class Text_lianxi extends Thread {public void run () {try {yunxing
It is easy to implement the automatic growth of inserting data in SQL Sever, but it is not easy to do this in an Oracle database, And you want to be in. NET to get the ID of the newly inserted data, and not to read the error, it is even more
One, the most important difference: the importance of storing data is different"SYS" the base tables and views of all Oracle data dictionaries are stored in the SYS user, which is critical to the operation of Oracle, maintained by the database
select * from Dba_users;--Query all users in the databaseALTER user Scott account lock;--Lock usersalter user Scott account unlock;--Unlocking the userCreate user username identified by password;Grant connect to user name;--Authorized user
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