Home SQL Basic SQL Functions
07.09.2010
Main Menu
Programming
.NET Controls
Operating System
Databases
Articles
Add to: Digg Add to: Del.icoi.us Add to: Reddit Add to: StumbleUpon Add to: Slashdot Add to: Yahoo Add to: Technorati Add to: Google
SQL Functions

Similar to any programming language, SQL contains many built in SQL functions that we can use to perform arithmetic calculation or just simply to find out the largest value of a result set.

Some of the most commonly used functions are:

 Function Name  Description
AVG() Getting the average value of a data field.
CONCAT() Join two strings together as one string.
COUNT() Getting the total number of rows in the result set.
FIRST() Getting the first value in the result set.
FORMAT() Enable you to customise how the data will returns in the result set
LAST() Getting the last value in the result set.
LCASE() Convert the field into a lower case text.
LEN() Getting the total length of a text field.
MAX() Getting the maximum value of a data field.
MID() Enable you to retrieve some part of the text in the data field.
MIN() Getting the minimum value of a data field.
NOW() Getting the current system date and time.
SUM() Get the sum value of a text field.
UCASE() Convert the field in an upper case text.

 

The above mentioned list of functions are just general functions, different RDBMS vendor may have different name for this functions. For example in Oracle LCASE is know as LOWER in Microsoft SQL Server but they still serve same purpose. Check with the RDBMS vendor reference manual for the exact syntax. 

You will learn more about some of these functions in the next few tutorials.

 



Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Please input the anti-spam code that you can read in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."