Turn Desktop View Off
by Dinesh Thakur

SQL COUNT is the aggregate arithmetic function. COUNT allows us to COUNT number of row that matches specified criteria. This function returns the number of rows in the query. The COUNT function will only count those records in which the field in the brackets is NOT NULL. The SQL COUNT function is easy to use.

 
by Dinesh Thakur

SQL REPLACE function is used to replace character or group of characters in a string with zero or more characters. The REPLACE function is easy to use. SQL Replace () function searches for particular characters in a sentence or string and replaces them with other characters.

 
by Dinesh Thakur

All of the aforementioned functions relate to specific ways to manipulate character, date/time, or numeric datatypes. But you may need to convert data from one datatype to another or convert NULL values to something meaningful.

 
by Dinesh Thakur

 The ROUND function allows you to round any numeric value. The general format is:

ROUND (NumericValue, DecimalPlaces)

 
by Dinesh Thakur

The simplest of the date/time functions is one that returns the current date and time. In Microsoft SQL Server, the function is named GETDATE. This function has no arguments. It merely returns the current date and time. For example:

 
by Dinesh Thakur

The simplest of the date/time functions is one that returns the current date and time. In Microsoft SQL Server, the function is named GETDATE. This function has no arguments. It merely returns the current date and time. For example:

 
by Dinesh Thakur

The simplest of the date/time functions is one that returns the current date and time. In Microsoft SQL Server, the function is named GETDATE. This function has no arguments. It merely returns the current date and time. For example:

 
by Dinesh Thakur

The DECODE function can be thought of as an inline IF statement. DECODE takes three or more expressions as arguments. Each expression can be a column, a literal, a function, or even a subquery. Let's look at a simple example using DECODE:

 
by Dinesh Thakur

The NVL and NVL2 functions allow you to test an expression to see whether it is NULL. If an expression is NULL, you can return an alternate, non-NULL value, to use in its place. Since any of the expressions in a DECODE statement can be NULL, the NVL and NVL2 functions are actually specialized versions of DECODE. The following example uses NVL2 to produce the same results as the DECODE: