Create or Replace procedurePr_test1 isV_case Number(3) := -;--Defining Variablesbegin--/ * Judgment Statementif 2>1 ThenDbms_output.put_line ('conditions established'); ElseDbms_output.put_line ('conditions are not tenable'); End if; if 21
Dual is the smallest worksheet provided by Oracle, with a single row and some special functions.Regardless of what you do (don't delete records), it has only one record-' X '.Role:1. Select evaluates constant expression and pseudo-column equivalence.
The set operator is specifically used to combine the results of multiple SELECT statements, including: Union, union All, INTERSECT, minus. When you use the SET operator, you must ensure that the number of columns in different queries matches the
After CDB restarts, PDBs is in mounted state by defaultSql>SelectName,open_mode fromv$pdbs;name Open_mode------------------------------ ----------pdb$seed Read ONLYPDB1 read WRITEPDB2 read W Ritesql>shutdown immediate;database closed. Database
--Absolute valueSelect ABS ( -100) from dual;--Take surplusSelect mod (8,3) from dual;--Rounding, the smallest integer greater than the number (upper value)Select Ceil (12.0) from dual;Select Ceil (12.5) from dual;--rounding, which is less than the
1,rownum is a virtual column that must be used with 1 to use, RowNum = 1,rownum 2,if case loop To add end to ending, end if;3, foreign key, foreign key (s) references table_name (PK)4, create a table, copy the contents of Create table t_1 as SELECT
Common data types for Oracle databasesAll Oracle data types are available in 26 categoriesCharFixed-length string type length is invariant, for example: No char (10) If the value of the deposit is less than 10 characters, the other bits are also
SQL constraintsConstraints are used to restrict the type of data that is joined to a table.You can specify constraints (through the CREATE TABLE statement) When you create the table, or you can (via the ALTER table statement) after the table is
In some cases, it takes several very large tables to correlate the case, but the time to retrieve is a small amount of data.You can first retrieve the large table data, then insert it into the temporary table, and then associate the processing.For
When you install Oracle, the state of the system requirements is detected as the wrong solution:Checking operating system requirements ....Required Result:One of the 5.0,5.1,5.2,6.0Actual results:6.1is actually caused by the configuration fileLocate
FunctionUsed to calculate and return a value .StructureCreate [or replace] function function name [( parameter list )] return data type is[ internal variables ]BeginStatement[exceptionException handling code ]End [ function name ];Function
1. To optimize the query, avoid full-table scanning as far as possible, and first consider establishing an index on the columns involved in the Where and order by.2. Avoid null-valued fields in the WHERE clause, which will cause the engine to
The self-increment in Oracle is less convenient than SQL Server.1--1. Creating a sequence2CREATE SEQUENCE"table_name"."Sq_name"3MINVALUE1MAXVALUE99999999999999999999999999994--defines the step size of a column, which defaults to 15INCREMENT
1, to unlock the userAlter user Scott account unlock;2, log off, disconnect, switch the current user connectionQuitConn Scott/tiger3, User rights queryA. View all Users:SELECT * from Dba_users;SELECT * from All_users;SELECT * from User_users;B. View
[Oracle] oracle functions-numeric functions, oracle function values
I. Numeric Functions
1. mod (m, n) Evaluate the remainder Function
NOTE: If m or n is null, null is returned. If n is 0, the value of m is returned.
Eg:
2. round (m [, n ])
ORA-12514: TNS: The Listener currently cannot identify the Service requested in the connection Descriptor
When PL/SQL is connected to the Oracle database, the error "ORA-12514: TNS: The Listener currently cannot identify the Service requested in the
Auxiliary SQL statements for oracle Database optimization, oraclesql
For details, see the code analysis below.
-- Query the SQL statement that is being executed. SELECT the OSUSER computer logon identity, the PROGRAM where the PROGRAM initiates the
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