First, some conceptsDefined:Primary Key-uniquely identifies a record, cannot be duplicated, is not allowed to be emptyForeign key--the foreign key of the table is the primary key of another table, the foreign key can have duplicate, can be a null
Triggers are stored as separate objects in the database, and unlike stored procedures, stored procedures start running through other programs, and triggers are started by an event. 1. Trigger characteristics 1> triggers are automatically run when an
In is used in Oracle string, but no data is found1 string " SELECT * from TB_YBSH where ID in:ids " ; 2 New OracleParameter ("ids", IDS); 3 DataTable dt = dbhelperora.executetable (getmodel,p);Direct stitching is availablestring " SELECT * from
In 12C, when a column is defined as "invisible," the SQL statement without direct access to the column is unable to see the "invisible column", and the statement that explicitly references the "invisible column" can access and manipulate the
In previous versions, the parent table could not be truncate directly when there was a foreign key constraint. In 12C, a cascade operation attribute was added to the truncate operation.If you create a FOREIGN key constraint, use "on Delete
Oracle provides the ability to store PL/SQL blocks in a database and to run it anywhere, a PL/SQL program block called a stored procedure or function.The difference between stored procedures and functions: the function needs to return data to the
To view the Oracle database character set:Sql> Select Userenv (' language ') from dual;USERENV (' LANGUAGE ')--------------------------------------------------------------------------------American_america. we8mswin1252sql> shutdown immediate;sql>
This problem encountered many times, every time the system was met once, but always take half a day to fix.Today it takes a couple of hours to settle, and finally a clear understanding must be recorded.One, download decompression, do not build any
rownum and rowID are pseudo-columns, but the root of the two is different, rownum is to assign a logical number to each row based on the results of the SQL query, so your SQL will result in a different final rownum, but rowID is physically
Use OracleDataAccess.dll to access the Oracle database, encountered in Chinese garbled situation.The solution is as follows:1 Viewing character set encoding, starting sqlplus on the database server sideSql->select userenv (' language ') from
The Oracle statements are as follows:How to use: Start With.....connect by Prior. Where start with the following condition 1 is the parent node's query criteria, connect by prior followed by the condition 2 is the same as the record's parent node in
Oracle Learning Note onepermissions are divided into sysdba,nomal, the system comes with two users , the starting password is empty . the user is: System,sys. Login SYSTEM should use sysdba permissions to log in, if you forget the password, open the
I. VARCHAR2 (10) and number should be converted why type?When Oracle turns into MySQL:VARCHAR2 (10) can be turned into varchar (10)Number depends on what type of data is stored in Oracle:1, if the integer type, then MySQL, with an int can be;2, if
Three types of collection operations are available in Oracle: and (UNION), intersection (INTERSECT), poor (minus)
UNION: Combine the results of multiple queries into one query result and remove duplicate values
UNION All:
Ora-01034, ora-27101 troubleshooting
Error cause:
Solution: ora-27101
There may be 2 scenarios, which may lead you to encounter ORA-271011) Invalid ORACLE_HOME and ORACLE_SID (configured in environment variables)2) Database is down (check
The best way to record errors in oracle stored procedures
When your application calls a stored procedure and dozens or hundreds of nodes, it is difficult to find an error. At this time, I suggest writing it to the database, below is a demo I made.
1.
Vertical table and horizontal table, vertical table horizontal table
Vertical vs horizontal
The following example shows the traditional horizontal table structure:
Table HR
ID
Surname
Name
Department
Gender
Mysql, SQL server, oracle Database paging query and Analysis (Operation Manual), mysqloracle
1. mysql paging Query
Method 1:
select * from table order by id limit m, n;
This statement means to query m + n records, remove the first m records, and
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