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”
Tag: Sql server
Microsoft SQL Server is a relational database management system developed by Microsoft.
Authorcode SQL Server tutorial covers the basic concepts of the SQL server with the examples. Examples of the tutorial are very simple and easy to understand. You can learn the SQL server basic and advanced techniques and how to use sql queries from this tutorial.
Truncate all tables in SQL Database from single command
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”
List of Sql Server versions
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 in sql server
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”
Using Cross Joins
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”
What are the difference between DDL, DML and DCL commands?
DDL
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?”
System Databases in SQL Server
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”
Using COALESCE in SQL Select Query
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”
About Sql Server 2005
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”
Using Aliases in SQL Server
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”