How to Rename Database in SQL Server - SQL Server / TSQL Tutorial Part 26
Scenario:We often face the situation where we need to rename the database. Think about situation, you are working as SQL Server developer for Financial firm and they have the database name...
View ArticleWhat is Schema in SQL Server and How to Create/Drop Schema in SQL Server...
What is Schema : As per Microsoft website :A Schema is distinct namespace to facilitate the separation, management, and ownership of database objects.How to create Schema by GUI:Open the SSMS and you...
View ArticleHow to Change Schema of an Object(Table,View,Stored Procedure) in SQL Server...
Scenario:You are working as SQL Server developer in Life Insurance Company. They have Database Name TechBrothersIT and one of the Schema name the objects are using is TB. They have given you assignment...
View ArticleCannot drop the schema '', because it does not exist or you do not have...
Scenario:You are working for Mortgage Company as SQL Server developer. You got this requirement to prepare SQL script to drop schema. You useDrop Schema SchemeName statement in development SQL Server...
View ArticleHow to Connect to SQL Server Instance by using Windows Authentication or SQL...
You can use windows authentication or SQL Server Authentication to connect to SQL Server Instance. In this video you will both ways.How to use Windows Authentication and SQL Server Authentication to...
View ArticleUse Create Statement to Create Table in SQL Server - SQL Server / T- SQL...
Scenario:An Excel file is provided to you with some information related to Customer with below columnsFirst Name,Last Name,Age,Phone Number,Data of Birth,Sexand you are asked to create Table in SQL...
View ArticleWhat is the Difference between CHAR and VARCHAR in SQL Server - SQL Server /...
CHAR and VARCHAR both data types are used to store character strings.Char is fixed width, That means that the storage size of char value is equal to the maximum size of the column/ Variable.Varchar is...
View ArticleWhat is difference between VARCHAR and NVARCHAR in SQL server - SQL Server /...
Varchar is variable length character data type which is used to store Non-Unicode data format. You can think of Non-Unicode as English characters.NVarchar is also variable length character data type...
View ArticleWhat is the difference between Float and Numeric/Decimal in SQL Server - SQL...
Float and Real are approximate data types. Float and Real data types do not store exact values for many numbers.The value can be extremely closed.Numeric/Decimal are fixed precision data types. It...
View ArticleHow to Alter Table in SQL Server by using Alter Statement - SQL Server /...
Scenario:Let's say that you are working as SQL Server developer in Mortgage Company. In TechBrotherIT database, there is Dbo.Customer Table with below definition.CreateTable dbo.Customer(FirstName...
View ArticleHow to Rename a Column Name or Table Name in SQL Server - SQL Server / T-SQL...
Scenario:You are working as SQL Server developer for Auto Insurance Company. On one of SQL Server Instance, they have Database with name Insurance. In Insurance Database they have table dbo.Customer...
View ArticleHow to create Table by using GUI In SQL Server - SQL Server / T-SQL Tutorial...
Scenario:You are working as SQL Server developer for Trading Company. They have some users who have permission to create tables in one of the Sandbox Database. You need to show them how to create table...
View ArticleHow to Alter Columns or Generate Alter Scripts by using GUI in SQL Server -...
Scenario:You are working as SQL Server developer for Law Firm. You have created table customer in one of the Database "TechBrothersIT" by using below Script.CREATETABLE [dbo].[Customer]( [FirstName]...
View ArticleHow to Add or Drop Column by using GUI in SQL Server - SQL Server / T-SQL...
Scenario:You have created table dbo.Customer by using below script in Database TechBrothersIT. CREATETABLE [dbo].[Customer]( [FName] [varchar](50) NULL, [LName] [varchar](30) NULL, [Age] [tinyint]...
View ArticleHow to Add identity Column to Table by TSQL and GUI in SQL Server - SQL...
Scenario:You are working as SQL Server Developer and you have created a dbo.Customer table by using below Script.CREATETABLE Customer ( FirstName VARCHAR(50) ,LastName VARCHAR(50) ,Age SMALLINT...
View ArticleHow to add Computed Column in SQL Server Table - SQL Server / T-SQL Tutorial...
Scenario:You are working as SQL Server Developer for one of the Law Firm. You have created a dbo.Customer table by using below definitionCREATETABLE Customer ( CustomerId INTIdentity(1, 1) ,FirstName...
View ArticleHow to find all the tables with Identity Column in SQL Server Database - SQL...
Scenario:How would you find all the tables in a SQL Server Database which has identity Column?Solution:We can use system tables such as sys.columns and sys.tables to get this information.--Find out all...
View ArticleHow to Get Identity Column Values without mentioning Identity Column Name in...
Scenario:You took a quick look on Table and Columns in SQL Server but could not find if Identity Property is enabled on one of the column. You don't want to use system tables to find out the column...
View ArticleHow to Generate Drop Table Statement for all the tables in a database - SQL...
Scenario:You are working as SQL Server developer in Credit Card Company. You need to generate Drop Table statements for all the tables in Database TechBrothersIT that you are using as Staging for Data...
View ArticleHow to Generate Add Column Statement for all the tables in a Database in SQL...
Scenario:You are working in Auto Insurance Company as SQL Server Developer. Your company has a database in which they have more than 300 Tables. In initial design, they forgot to add Audit columns such...
View Article