Simple SQL SERVER view with example

What is sql server view ? Views are also known as virtual table in sql server that contain columns and rows. Multiple queries are combined together to define sql server view, it uses the data from one or more tables in sql database. We can insert data through view into table that you have seen ...

SQL Server – How to add column in table

For adding column in table of sql server, We can make use of alter table statement  i.e  alter table [tablename] add [columnname] datatype.  Here datatype could be anything like char, int, varchar, nvarchar that is purely depends upon data that will store in column. Lets take a scenario to understand how to alter table on UAT server. In ...

SQL Server – Move sql database to another drive 1

We can move sql server system database and user database to another drive, in case SAN disk is full then copy the sql server mdf and ldf to another drive that has more drive space. Sql server will not allow to move database files while online.  We have to put database offline and then only it ...