Tutorial by Examples

Character modifying functions include converting characters to upper or lower case characters, converting numbers to formatted numbers, performing character manipulation, etc. The lower(char) function converts the given character parameter to be lower-cased characters. SELECT customer_id, lower(cu...
In SQL, you use date and time data types to store calendar information. These data types include the time, date, smalldatetime, datetime, datetime2, and datetimeoffset. Each data type has a specific format. Data typeFormattimehh:mm:ss[.nnnnnnn]dateYYYY-MM-DDsmalldatetimeYYYY-MM-DD hh:mm:ssdatetim...
An example of a configuration function in SQL is the @@SERVERNAME function. This function provides the name of the local server that's running SQL. SELECT @@SERVERNAME AS 'Server' ServerSQL064 In SQL, most data conversions occur implicitly, without any user intervention. To perform any convers...
SQL has two logical functions – CHOOSE and IIF. The CHOOSE function returns an item from a list of values, based on its position in the list. This position is specified by the index. In the syntax, the index parameter specifies the item and is a whole number, or integer. The val_1 … val_n paramete...

Page 1 of 1