value Select min from EMP; Max: Max value Sum: Sum Count: Calculates the number of bars; note: null rows are not counted if the column name is written. Select Count(*) fromEmpwhereJob='MANAGER';--count the number of managers
Select sum(SAL) fromEmp--sum of statistical wages
Select Count(*) fromEmpwhereDeptno= -;--Statistics Department Number 30, how many people?
Select Count(distinctJob fromEmp--How many jobs are there, removing duplicate data Note: The results of the query can not be displa
Single-record functions in SQL
1. ASCIIReturns the decimal number corresponding to the specified character;
SQL> select ASCII ('A') A, ASCII ('A') A, ASCII ('0') zero, ASCII ('') space from dual;
A A zero space
------------------------------------
65 97 48 32
2. CHRReturns the corresponding characters;
SQL> select CHR
Differences between oracle and SQL (common functions) ORACLE functions
BitsCN.com
Many software companies understand the importance of developing applications that do not depend on specific database types (such as Oracle,
Common commands and functions of Oracle SQL * plus, oracleplus
Common commands and functions in Oracle are sorted out for future use for convenient reference.Common commands:
Connect to sqlplusRun cmd in the command line to enter. For example, to log on in sys mode, the comm
1. stored Procedures, functions, and triggers are all written in plsql. the process, function, and trigger are in the Oracle database. plsql is a very powerful database process Language 4. stored Procedures and functions can be used to call more Oracle Data in Java. video tutorial: 2.taobao.comitem.htm? Id42922011874sp
TimeStandard Time for mst mdt Mountainous AreasNST standard time for new FinlandPst PDT Pacific Standard TimeYst ydt Yukon Standard Time
Character functions supported by Oracle and Their Microsoft SQL Server equivalent functions:
Functions:
Tags: start input trail Mat Average SQL function tin padded user1.SQL function(1) Character function: mainly manipulating strings(2) Number function: The number of numeric types is mainly manipulated(3) Conversion functions: These functions convert data from one data type to another data type(4) Date function: processi
1. Character functions:
The characters in SQL Server are case-insensitive.However, the lower and upper functions are common in SQL Server, Oracle, and DB2. For example, select empno, ename, deptno from EMP where upper (ename) = upper ('bucket ');
Example of connection chara
Label:Some of the company's Oracle projects have recently been transferred to Ms_sql and have encountered translation problems in translating Oracle functions into Ms-sql procedure. Luo lists these questions: First, Oracle basic type
Single-record functions in SQL1. ASCIIReturns the decimal number corresponding to the specified character;SQL> select ASCII ('A') A, ASCII ('A') A, ASCII ('0') zero, ASCII ('') space from dual;
A A zero space------------------------------------65 97 48 32
2. CHRReturns the corresponding characters;SQL> select CHR (54740) Zhao, CHR (65) chr65 from dual;
Zh C---Zha
PL/SQL subprograms include functions and procedures. The function here refers to the user-defined function, which is different from the system function. A subroutine is a PL/SQL block that completes a specific function. It is universal and can be called multiple times by different applications. Oracle provides the abil
Single-record functions in SQL
1. ASCIIReturns the decimal number corresponding to the specified character;SQL> select ASCII ('A') A, ASCII ('A') A, ASCII ('0') zero, ASCII ('') space from dual;
A A zero space------------------------------------65 97 48 32
2. CHRReturns the corresponding characters;SQL> select CHR (547
Oracle mathematical functions are not the same as those in SQL Server. The following describes the differences between Oracle mathematical functions and SQL Server mathematical functions
Common commands and functions of Oracle SQL * plus, oracleplus
Common commands:
Connect to sqlplusRun cmd in the command line to enter. For example, to log on in sys mode, the command is as follows:(1). sqlplus "sys/zhb126 as sysdba"
(2). sqlplus/nolog connect sys/zhb126 as sysdba
(3). sqlplus scott/tiger
Start a database instance
Startup -- start the control fil
The DECODE function is Oracle PL/SQL is one of the most powerful functions, and only Oracle SQL provides this function, and the SQL implementations of other database vendors do not yet have this function. What is the use of decode
');Values time (' 22:45:27 ');Values time (' 22.45.27 ');--Calculates the difference between two time stamps:-The number of seconds is divided into unitsValues Timestampdiff (1,char (current timestamp-timestamp (' 2010-01-01-00.00.00 ')); --Unit of secondsValues Timestampdiff (2,char (current timestamp-timestamp (' 2010-01-01-00.00.00 ')); --Divided into unitsValues Timestampdiff (4,char (current timestamp-timestamp (' 2010-01-01-00.00.00 ')); --Hour unitValues Timestampdiff (8,char (current ti
The main content of this article is as follows:
6.1 Introduction
6.2 create a function
6.3 stored procedures
6.3.1 creation process
6.3.2 call a stored procedure
6.3.3 AUTHID
6.3.4 PRAGMA AUTONOMOUS_TRANSACTION
6.3.5 procedure
6.3.6 deletion process and Function
6.3.7 comparison of processes and functions
6.1 IntroductionProcedures and functions (In addition, packages and triggers) are named PL/
PL/SQL subroutine it contains functions and procedures. This function refers to a user-defined function. And the system functions are different. subroutines usually complete a specific function PL/SQL block. , can be called multiple times by different applications . Oracle
Department groupSelect Deptno, Max (ename), Max (SAL),Min (ename), Min (Sal),AVG (SAL),Count (*), COUNT (Job), COUNT (Distinct (job)),Sum (SAL) from the EMP group by DEPTNO;2) Department 30 maximum wage, minimum wage, total number, number of jobs, number of jobs and sum of wagesSelect Deptno, Max (ename), Max (SAL),Min (ename), Min (Sal),AVG (SAL),Count (*), COUNT (Job), COUNT (Distinct (job)),Sum (SAL) from the EMP group by DEPTNO have deptno=30;3.stddev returns the standard deviation of a set
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.