The following download files provides scripts for creating the EmployeeDb sample databases for use with SQL Server. The Scripts have created from the Microsoft SQL Server Management Studio. The EmployeeDb is using in the various examples, tutorials and projects on the Authorcode. Continue reading Creating the EmployeeDb sample SQL database
Today i need to blank all the tables in the SQL database. Till now I was using the truncate table command with the for loop in the code because i need to blank few tables. But now i need to blank whole database so i decided to use the sp_MSForEachTable system stored procedure like as: Continue reading Truncate all tables in SQL Database from single command
The following is the list of the SQL Server version. With the help of the following list you can know that what service packs are installed on SQL Server on your machine. Continue reading List of Sql Server versions
Cascading Referential integrity applies to the DELETE and UPDATE statements only because they cause changes to existing rows.
There are two actions that can take place for either operation: Continue reading CASCADING referential integrity in sql server
We can use Cross Join with WHERE clause and Without WHERE clause, When we use the Cross Join without WHERE clause,produces the Cartesian results from the tables. The resultset contains records that are multiplication of record number from both the tables. Continue reading Using Cross Joins
Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples: Continue reading What are the difference between DDL, DML and DCL commands?
SQL server installation create some system databases automatically, you can see these database in your SQL server management studio: Continue reading System Databases in SQL Server
COALESCE function returns the first nonnull expression among its arguments. you can use the COALESCE function like as: Continue reading Using COALESCE in SQL Select Query
Microsoft SQL Server is a relational database management system developed by Microsoft. SQL Server 2005 was released in October 2005. It is the successor of the Microsoft SQL Server 2000. Continue reading About Sql Server 2005
You can use some alias for table in the select query for better readability of the query, Aliases of the table are very useful when you are using complex query with multiple lines. Aliases of the tables in the Sql server are also called as a correlation name or range variable. Continue reading Using Aliases in SQL Server