SQL Server

Posts filed under SQL Server

SQL Server: Using Alias Name with Select Statement

Filed in SQLTags: , , ,

The Alias name is the name that is referred to any column name or table name that is given by user. The alias name also used to represent some column or table without using its real name. As we will proceed in this article we will see that how we can use both the alias [...]

Cast() Function in SQL Server

Filed in SQLTags: , , ,

The Cast() Function is used to change the data type of a column. We can use the cast() function for various purpose. Syntax: Cast(Original_Expression as Desired_DataType)

How to use SQL Commands in C#.NET

Filed in ASP.NET, SQLTags: , , , , , , , , , ,

In this article we will see that how can use and execute the SQL Commands in Visual Studio. In this article we are using C# language. As we proceed in this article you will see that what steps are required to perform this task. We need the two main classes to do this. These classes [...]

Using if-else Statement while Inserting the Record in SQL Server Database

Filed in SQLTags: , , , ,

Today we will learn that how to use an if-else statement while inserting records into the database. We are talking about the SQL Server database. To understand this example we are understanding a problem that will make easy to  learn if-else statement. Our problem is we want to insert a record into the table named [...]

SQL Server Database Backup and Restore Database

Filed in ASP.NET, SQLTags: , , , , , ,

While working with database we need to store our information time to time. and for that purpose we take the backup for that database. Backing up a database provide many solutions for us. The main thing is if we lost our database from SQL Server then we can restore our database from our computer. Also [...]

Constraints and Types of Constraints in SQL

Filed in ASP.NET, SQLTags: , , ,

Hello guys, I hope you are enjoy reading article. Today we are going to discuss the Constraints that we need to use in SQL while programming. Some time we need to put some type of restriction on the column of the table. These restriction are called constraints. Also we are going to discuss the types [...]

Implementing If-Else Statements in T-SQL(MS SQL Server)

Filed in ASP.NET, SQLTags: , , , , ,

Control-of-flow statements are very must for any programming language. A complete project can not be completed without any condition. And when we talk about the condition there are various types of control statements in T-SQL. Today we will discuss first If statement then If-Else statements in T-SQL. If-Else statements do the same task as for [...]

How to Declare and Assign a Variable in SQL Server

Filed in ASP.NET, SQLTags: , , , , ,

While programming in SQL Server some time we need to do something more than just creating Tables and Stored Procedure. Somtime we need to access a user define  variable inside the SQL script. The variable is the name of the memory location that stores some specific value. and also another property of variable is that [...]