Sunny Books
What we have

SQLSunny Books

SQL Server stored procedure

A stored procedure is a group of SQL (Transact SQL) statements. If you have a situation where you write the same query over and over again, you can save that specific query as a stored procedure and call it just by its name.

SQL indexes and index types

Indexes are used by queries to find data from tables quickly. Indexes are created on tables and views. Index on a table or a view is very similar to an index that we find in a book.

SQL Server user defined functions

In SQL Server there are three types of USER Defined Functions: 1. Scalar functions 2. Inline table-valued functions 3. Multi-statement table-valued functions

SQL Server Cast and Convert

Both CAST and CONVERT convert an expression of one data type to another in SQL Server. CAST is ANSI standard and CONVERT is specific to SQL Server.

SQL Server Date and Time Functions 2

This is the second part of SQL Server Data and Time functions. we talk about DATEADD, DATEDIFF, and EOMONTH.

SQL Server Date and Time Functions 1

The floowings are SQL Server builtin functions for getting system date and time values.

SQL Server Builtin String Functions

The followings are some common used String functions for SQL SERVER.

Replace NULL Values in SQL Query Results

There are three ways to replace NULL values in SQL query result set: ISNULL function, COALESCE function, and CASE statement.


SQL JOIN and UNION are two different operations. A Union and Join are similar in that they both are combining two tables to form another table. However they do this combining in different ways.

SQL UNION Operator

he UNION operator combines two or more separate SELECT statements into one result set. A JOIN statement adds additional table columns to a result set (horizontally), while UNION combines row results from one table with rows of another table (vertically).

 1 2 >