SQL SERVER 2008 – FUNCTIONS In SQL SERVER 2008

SQL Server 2005 provides built-in functions that can be used to perform certain operations. Functions can be used or included in the following:

–          The select list of a query that uses a SELECT statement to return a value.

–          A WHERE clauses search condition of a SELECT statement to limit the rows that qualify for the query.

Syntax for executing a function:

SELECT <Fun Name> ( [ <expressions> ] )

-The expression can be a constant values or a name of a column.

Functions can be classified into 2 types:

A single row function executes once for each row that is present in the table where as group functions take multiple rows into consideration and returns a single value as output.

Single Row Function Categories:

  1. Mathematical Functions
  2. String Functions
  3. Date and Time Functions
  4. System Functions

Reference : Dilip Kumar Jena ( https://sqlexplore.wordpress.com )

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s