Lets suppose Database Name is MYDB and TABLE1, TABLE2, TABLE3 are tables in MYDB databaseSql query to retrieve all the column names in a table : select COLUMN_NAME from MYDB.INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = ‘TABLE1’Sql query to get common Columns in two tables in Sql Server : select COLUMN_NAME from MYDB.INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = ‘TABLE1’ intersect select COLUMN_NAME from MYDB.INFORMATION_SCHEMA.COLUMNS where TABLE_NAME… Continue Reading Sql query to get common Columns in multiple tables in Sql Server

While i was working with a C# application I got the need of getting all the database names in a ComboBox, I googled and found some queries to get the list of all database names. If you are working on master database, the query will be any one of the… Continue Reading Retrieving List of All DataBases in Sql Server

Create the table as follows CREATE TABLE Student_Register( SNo INT NOT NULL IDENTITY(1000, 1), Student_Id AS ‘STU_’+CAST( SNo as varchar(10)) PERSISTED PRIMARY KEY, First_Name VARCHAR(20), Last_Name VARCHAR(20), Date_Of_Birth DATE, Address VARCHAR(100), Mobile_No BIGINT ) Here while inserting there is no need to pass values of Sno, Student_Id column. Then insert… Continue Reading HOW TO SET IDENTITY KEY/AUTO INCREMENT ON VARCHAR COLUMN IN SQL SERVER

A relational database management system (RDBMS) is a program that lets you create, update, and administer a Relational Database. Most commercial RDBMS’s use the Structured Query Language (sql) to access the database. The leading RDBMS products are Oracle, IBM’s DB2 and Microsoft’s SQL Server. Despite repeated challenges by competing technologies, as well… Continue Reading What is Relational Database Management Systems ( RDBMS )

-> Microsoft SQL SERVER is a relational database management system (RDBMS) used to store large amount of data. -> Its is also called as “SEQUEL SERVER”. -> SQL SERVER is a platform dependent,  because it works only in windows operating systems like Windows XP, Windows Vista, Windows7,Windows server 2003 and… Continue Reading MICROSOFT SQL SERVER