Tag Archives: SQL Basic Concepts

SQL SERVER – Data types

Data types in SQL Server In relational database, we store data in tabular form where data is divided into columns. Each column has a name and a data type which shows what type of data is going to store in … Continue reading

Posted in SQL Basic, SQL Data Types, SQL Server | Tagged | 32 Comments

SQL Server – Convert() function

Convert () function in SQL Server Convert () function is used to convert an expression from one data type to another data typeSyntax for CONVERT function CONVERT ( data_type [ ( length ) ] , expression [ , style ] ) Convert functions … Continue reading

Posted in SQL Basic, SQL Functions, SQL Server | Tagged , | 31 Comments

IN clause in SQL Server

With IN clause, we can specify multiple values in a WHERE clause. For example, in case of “IN”, one can use the subquery to get the multiple values in the IN clause or we can have predefined values. In this … Continue reading

Posted in SQL Basic Concepts, SQL Server | Tagged , | 32 Comments

While loop in SQL server

While loop in SQL server Introduction In While loop, we set a condition for the repeated execution of a Code block. So we use while loop in SQL Server to repeat execution of a SQL Code block or a SQL Statement … Continue reading

Posted in SQL Basic Concepts, SQL Server, SQL While loop | Tagged , , , | 13 Comments

Case Statement/ Expression in SQL Server

Case Statement/ Expression in SQL server  Sometimes we need to get one result output from multiple possible outcomes based on the evaluation of some expression. This expression can be a simple case expression which compares an expression with a set … Continue reading

Posted in Most Imp SQL Concepts, SQL Basic Concepts, SQL Server | Tagged , | 1 Comment

Boyce – Codd Normal Form (BCNF)

Boyce – Codd Normal Form (BCNF)  :- A normal form is said to be a Boyce – Codd Normal Form if it is in 3NF and there is not a possibility of a key attribute is determined by a Non Key attribute. … Continue reading

Posted in SQL Normalization, SQL Server | Tagged , | 8 Comments

Adding , Deleting and Updating a Column in a table

Many times we need to alter the table definition by adding , deleting or updating a column in the table. In this article, I am trying to explain the following :- 1. How to add a column 2. How to … Continue reading

Posted in SQL Basic Concepts, SQL Server | Tagged , | 29 Comments

SQL Server-Table Variable

Table variable:- SQL Server provides an variable known as table variable which is used to store data in a similar way as we store data in physical tables but with some limitations. Like other SQL variable, it is also declare with the help … Continue reading

Posted in SQL Basic Concepts, SQL Server, SQL Temporary Tables | Tagged , | 4 Comments

SQL Server – Local temporary table

Local temporary table:- Local temporary table is created in the tempdb and it is visible to the current user’s session only. It remains exists till the current user session is connected. Once the user connection is disconnected it gets destroyed. … Continue reading

Posted in SQL Server, SQL Temporary Tables | Tagged , | Leave a comment

SQL Server – Global temporary tables

Global temporary table:- Global temporary table is created in the tempdb  and it is visible to all other sessions as well. Global temporary tables are only destroyed when the current user disconnected and all the sessions referring to it closed. It means no … Continue reading

Posted in SQL Server, SQL Temporary Tables | Tagged , | 31 Comments