HTML Tutorials |
|
XML Tutorials |
|
Browser Scripting |
|
Server Scripting |
|
.NET (dotnet) |
|
Multimedia |
|
Web Building |
|
Java Tutorials |
|
Programming Langauges |
|
Soft Skills |
|
Database Tutorials |
|
Operating System |
|
Software Testing |
|
SAP Module |
|
Networking Programming |
|
Microsoft Office |
|
Accounting |
|
|
SQL Functions
|
Uma fun��o � um tipo especial de comando que retorna um �nico valor.
|
Tipos de fun��es
|
Os tipos b�sicos de fun��es s�o: -
- Aggregate functions
Opera-se de encontro a uma cole��o dos valores, mas retorna-se um �nico valor.
- Scalar functions
Opera-se de encontro a um �nico valor, e retorna-se um �nico valor baseado no valor da entrada. As fun��es gostam de CURRENT_TIME por exemplo, n�o requerem nenhuns argumentos.
|
SELECT function(column) FROM table
|
Aggregate Functions
|
Retorna um �nico valor baseado em um jogo de outros valores. Se usado entre muitas outras express�es na lista do artigo de uma indica��o SELECT, a obriga��o SELECT tem um GROUP BY cl�usula. Nenhum GROUP BY cl�usula � requerido se a fun��o agregada for o �nico valor recuperado pela indica��o SELECT
|
As fun��es aggregate suportadas s�o:
|
Function
|
Usage
|
AVG(expression)
|
Computes the average value of a column by the expression
|
COUNT(expression)
|
Counts the rows defined by the expression
|
COUNT(*) |
Counts all rows in the specified table or view
|
MIN(expression)
|
Finds the minimum value in a column by the
expression
|
MAX(expression)
|
Finds the maximum value in a column by the
expression
|
SUM(expression)
|
Computes the sum of column values by the expression
|
SELECT COUNT(*) FROM customers;
|
Scalar Functions
|
As categorias diferentes de fun��o escalar s�o: -
- Fun��o interna
- Data & fun��o de tempo
- Fun��o num�rica
- Fun��o da corda
|
Algumas fun��es Scalar s�o: -
|
Fun��o |
Descri��o |
UCASE(c) |
Converts a field to upper case |
LCASE(c) |
Converts a field to lower case |
MID(c,start[,end]) |
Extract characters from a text field |
LEN(c) |
Returns the length of a text field |
INSTR(c,char) |
Returns the numeric position of a named
character within a text field |
LEFT(c,number_of_char) |
Return the left part of a text field
requested |
RIGHT(c,number_of_char) |
Return the right part of a text field
requested |
ROUND(c,decimals) |
Rounds a numeric field to the number of
decimals specified |
MOD(x,y) |
Returns the remainder of a division
operation |
NOW() |
Returns the current system date |
FORMAT(c,format) |
Changes the way a field is displayed |
DATEDIFF(d,date1,date2) |
Used to perform date calculations |
Keywords A fun��o da data do sql dos , fun��o m�xima do sql, fun��o do converso do sql, sql substitui a fun��o, fun��o da guarni��o do sql, fun��o de soma do sql, fun��o da corda do sql, fun��o redonda do sql, fun��o do sql do oracle, fun��o esquerda do sql
|
|
HTML Quizes |
|
XML Quizes |
|
Browser Scripting Quizes |
|
Server Scripting Quizes |
|
.NET (dotnet) Quizes |
|
Multimedia Quizes |
|
Web Building Quizes |
|
Java Quizes |
|
Programming Langauges Quizes |
|
Soft Skills Quizes |
|
Database Quizes |
|
Operating System Quizes |
|
Software Testing Quizes |
|
SAP Module Quizes |
|
Networking Programming Quizes |
|
Microsoft Office Quizes |
|
Accounting Quizes |
|
|