Oracle learning notes 3 SQL commands, oracle learning notes SQLSQL introduction SQL supports the following types of commands: 1. data Definition Language (DDL) 2. data manipulation language (DML) 3. transaction Control Language (TCL) 4. the Data Control Language (DCL) is a detailed note of the four
Label:String Functions1. Case conversion--upper converted to uppercase--lower convert to lowercase select upper (' AsaR ') 2. Length--len number of words--datalength bytes 3. Space before and after removal-- RTrim Remove the right space--ltrim remove the left Space 4. String intercept--left (' string ', 15) intercept 15 bytes from the left--right (' string ', 15) intercept 15 bytes from the right start--substring (' string ', 5,5) starts at the 5th byte on the left and intercepts 5 bytes of 5. R
UNION All SELECT 1 , 'b' , Ten UNION All SELECT 2 , 'b' , 6 UNION All SELECT 3 , 'b' , Ten UNION All SELECT 4 , 'b' , 6 UNION All SELECT 5 , 'b' , 8--SELECT *--From @t1SELECTName as 'Shooting Hand' , AVG(score) as 'Average' , STDEV(score) as 'Standard dev
Tags: force cal 3.1 developer Targe htm article load PL/SQLInvoking Java classes in Oracle database methods of developing stored procedures and functions time: December 24, 2014 viewed: 5,538 TimesOracle database development is very flexible, not only support the most basic SQL, but also provides unique PL/SQL, in addi
the character function character function is the most commonly used function in Oracle, let's see what the character functions are: lower (char): Convert the string to lowercase. Upper (char): Converts a string to an uppercase format. Length (char): Returns the lengths of the strings. substr (char, M, N): intercepts a substring of a string, n represents the meaning of n characters, not a delegate fetch to n
1.ABS:Function: Returns the absolute value of a given numberSELECT ABS (A) absolute_value from NUMBERS;2.CEIL and Floor:Function: Cell returns the smallest integer equal to or greater than the given parameterFloor returns the largest integer equal to or smaller than the given parameterSELECT B,ceil (B) CEILING from NUMBERS;SELECT A,floor (A) floor from NUMBERS;3.cos,cosh,sin,sinh,tan,tanhFunction: The Cos,sin,tan function can return the trigonometric function value of a given parameter, and the
Oracle tuning uses related SQL, oracle tuning related SQL
Select * from v $ session where username is not null;Select username, count (username) from v $ session where username is not null group by username;Select count (*) from v $ process;Select value from v $ parameter where name = 'processs ';Select count (*) from
The ceiling function and the floor function in SQL Server:The ceiling function returns the smallest integer greater than or equal to the given numeric expression.The floor function returns the largest integer less than or equal to the given number expression.Like what:Celling (12.1) results are 13Floor (12.1) results are 12Note: When the divisor is an integer, convert the *1.0 to decimal.For example:SELECT CEILING (SUM (COUNT) *1.0/p.boxconversion) fr
Welcome to the Oracle community forum, and interact with 2 million technical staff to enter the function is a program with zero or multiple parameters and a return value. In SQL, Oracle has a series of built-in functions, which can be called SQL or PLSQL statements.
Single-line functions-character Functions
Although each database supports SQL statements, each database also has operation functions supported by each database. These are single-row functions. If you want to develop a database, in addition to
are as follows:
. Pl/sql is a high-performance, transaction-based language that can run in any Oracle environment and support all data processing commands. Process SQL data definition and data control elements by using the PL/SQL program unit.
. Pl/sql supports all
SQL Server parses xml to Oracle and SQL Server Oracle
Write a program: Read a table in SQLserver Based on the status bit and download the value of one of the fields. The value is of the XML type, insert the content of the XML file to another Oracle database, and update the t
Whether you are a "development engineer" or "implementation engineer", there may be many online design report requirements in the company's related systems. Before you design a report, first, we need to understand how to write SQL statements, functions, processes, and Data Objects of specific databases. The following describes some common functions of
: Select product_type_id, AVG (price) from the products; Error Ora-00937:not a single-group group function. Aggregate functions cannot be used in a WHERE clause Example: Select product_type_id, AVG (Price) From Products where AVG (price) >30 Group BY PRODUCT_TYPE_ID; Error because where can only be filtered on a single row rather than on a group of rows, you can use having if you want to filter the conditions of the grouped rows. Correct practice: Sel
Method 1: As you all know, to connect to Oracle using PL/SQL, you need to install the Oracle client software. Have you ever wondered whether to directly connect to Oracle without installing the Oracle client? In fact, I always wanted to do this, because this client is so ann
[Oracle entry series] Chapter 2 _ Functions -- v512 studio Editor: Xuan Yu
Function
Nvl () function
Count () function
Case expression
My blog
Date type
Nvl2 () function
Dedode () function
Having clause
V512 Studio
Grouping functions and null values
Nullif () function
Coalesce () function
Group by cl
Tags: tcap to_char SQL statement string Tor Mina 1.2 unit definitionPL/SQL single-line functions and group functions A function is a program that has 0 or more parameters and has a return value. Oracle built a series of functions
Oracle recursive functions and concatenation, oracle recursive concatenation
1 SELECT SUBSTR(SYS_CONNECT_BY_PATH(tb.name,'->'),3) name2 FROM table tb3 START WITH nvl(tb.parentid,0)=04 CONNECT BY PRIOR ID=mt.parentid 5 ;In Oracle, The SYS_CONNECT_BY_PATH function is mainly used to distin
, 2) LENGTH ('World') REPLACE ('SQL', 'Q', 'x ')
--------------------------------------------------------
He 5 sXl
In the above example, we can see that the function of substr () is to intercept a string, followed by two parameters. The first parameter represents
Start position. The second parameter indicates the number of interceptions. The length () function returns the length of the string. Replace () string followed by two
Parameters. The first
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.