Do you want to know if the table exists in a in SQL Server ? . Below is a sample query that lets you know if the table exists or not. How to Check if the table exists in SQL Server ? Assume that the table name is Employee , run the below query to […]
Equivalent of IF Statement in SQL Server
There are times when you want to perform conditional checks within a SQL Query in SQL Server . Below is a sample Query that demonstrates how to do it. Equivalent of IF Statement in SQL Server Assume that the Employee table contains a column called “Designation” and we might want to show a value 1 […]
What is the Difference between varchar and nvarchar in SQL Server?
The SQL Server has the data type varchar and nvarchar . What is the main difference between the both ? Let’s explore it in this article. What is the Difference between varchar and nvarchar in SQL Server? varchar is a variable length and non-unicode data type which can take the 8-bit codepage. The collation of […]
How to Enable All Constraints back in the Database in SQL Server ?
In one of the articles , we explained How to Disable All Constraints in the Database temporarily in SQL Server ? , let’s look at the option of how to enable back the constraints in the SQL Server Database. How to Enable All Constraints back in the Database in SQL Server ? Below is a […]
How to Disable All Constraints in the Database temporarily in SQL Server ?
There are times when you may want to disable all the constraints in the your SQL Server Database tables when importing the data from the external data source . How to Disable All Constraints in the Database temporarily in SQL Server ? Below is a sample query that lets you to quickly disable the constraints […]
How to Add a Column with Default Value to Existing Table in SQL Server ?
Looking to add a column with default value to an existing table in SQL Server ? Below is an example and sample Data Definition Language Query for achieving the same. How to Add a Column with Default Value to Existing Table in SQL Server ? Assume that the table name is “ACEmployee” which already exists […]
How to Update From Select Statement in SQL Server ?
Below is a sample query that demonstrates how to update a table by getting the data from the select query in SQL Server. Assume that there are 2 tables AbundantCodeEmployee and AbundantCodeDepartment which contains the id . The id(in department) in this example refers to the department head . The columns “DepartmentName” is updated in the […]
How to find if the Column Exists in a table in SQL Server?
If you are looking to find if the column exists in a table in SQL Server, here’s a simple query to it. Assume that the table name is “Articles” and the column name is “AbundantCodeType”, below is a sample query to know if the column exists in SQL Server. How to find if the Column […]
What are the different Normalization form in RDBMS ?
There are many different Normalization forms in RDBMS . Below are some of the most commonly used ones. 1. 1NF (1st Normal Form) 2. 2NF (2nd Normal Form) 3. 3NF (3rd Normal Form) 4. BCNF ( Boyce-Codd Normal Form) 5. ONF ( Optimal Normal Form) 6. 4NF ( 4th Normal Form)
What is Normalization ?
Normalization in database is a set of technique applied to the data structures (tables) based on some predefined rules in building the database. The Normalization involves the process of organizing data in order to minimize redundancy. The Normalization generally involves splitting the database tables into multiple related tables .