Skip to main content

Posts

Showing posts from May, 2018

SQL Server Tutorial - Database queries

1. Rename Database: In this query we will learn about  How to rename database in SQL Server . 1 EXEC sp_renamedb 'oldName' , 'newName' OR 1 ALTER DATABASE oldName MODIFY NAME = newName 2. Rename Table: In this query we will learn about  How to rename Table in SQL Server . 1 EXEC sp_rename 'OldTableName' , 'NewTableName' 3. Rename Table Column: In this query we will learn about  How to rename Table Column in SQL Server . 1 EXEC sp_rename 'TableName.OldColumnName' , 'NewColumnName' , 'COLUMN' 4. Check SQL Server version: In this query we will learn about  How to check version of SQL Server . 1 SELECT @@version 5. Get list of hard drives with free space: In this query we will learn about  How to get list of system hard drives with available free space using SQL Server . 1 EXEC master..xp_fixeddrives 6. Get Id of latest inserte