Add New Column in MSSQL

Add a new column in MSSQL 

alter table <<table_name>>
add <<columnname>> <<data type>>

Example :-

alter table employee
add first_name varchar(25)

Advertisements

Get SQL Server Name in MSSQL

How to get MSSQL Server name in MSSQL  ?

select @@servername

How to get user name in MSSQL  ?

SELECT SUSER_NAME() LoggedInUser