by Dinesh Thakur Category: SQL Functions

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 Category: SQL Functions

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 Category: SQL Functions

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 Category: SQL Functions

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

ROUND (NumericValue, DecimalPlaces)
 

Page 6 of 6

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.



Search Content