Quantcast
Channel: SQL Server – How to Guides and Knowledge Feed
Browsing all 11 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

How to create database in SQL Server

Database is collection of objects like tables, stored procedures, Views, Functions, Synonyms, etc. There are two ways to create the database in sql server. 1. GUI(graphical user interface) and 2. T-SQL...

View Article



Image may be NSFW.
Clik here to view.

Start SQL Server in single user mode

Single User mode in SQL Server can connect with single user only and did not start checkpoint process. We have to start SQL Server in single user mode, when issues are like master Database restore,...

View Article

Restore master database in SQL Server

If master database is damaged or unusable, then we have to restore the master database. We can restore the database in two scenarios. 1. If server is accessible: step1: Put the server in single user...

View Article

SQL Server Shortcuts

Following are most useful SQL Server Shortcuts. Shortcut Description SSMS To Open SQL Server Management Studio Ctrl+N To open new query window in current connection Ctrl+Shift+N Open Project Ctrl+O...

View Article

Image may be NSFW.
Clik here to view.

How to change the database owner in SQL Server

Who creates the database is the owner of the database. We can change the owner of the database using either sp_changedbowner or ALTER AUTHORIZATION. When we create a database, a row created in...

View Article


Image may be NSFW.
Clik here to view.

Adventureworks database installation in sql server 2014

Adventureworks database is sample database sql server. Until 2012, Microsoft provided sample databases are in the format of mdf and ldf file downloads, we have to download and attach the mdf and ldf...

View Article

Image may be NSFW.
Clik here to view.

Windows could not start the sql server on local computer

Generally we receive the following error message when we tried to start the SQL server. Windows could not start the SQL Server (MSSQLSERVER) on Local Computer. Error 1069: The service did not start...

View Article

Image may be NSFW.
Clik here to view.

emp table script SQL Server

Standard emp table script for SQL Server 1) Create table structure 2) Insert data into emp table Create emp table CREATE TABLE EMP (EMPNO NUMERIC(4) NOT NULL, ENAME VARCHAR(10), JOB VARCHAR(9), MGR...

View Article


Image may be NSFW.
Clik here to view.

Table definition in SQL Server

If we want to see the table definition in SQL Server, then we can get using sp_help procedure. Syntax: sp_helptext [ @objname = ] ‘name’ [ , [ @columnname = ] computed_column_name ] Example: If we want...

View Article


Differences between where and having clause

WHERE: Where clause is used to filter the data based on condition. Only rows that meets conditions contribute data to the result set. Filters rows Where clause is executed before group by clause. Use...

View Article

Difference between delete and truncate

Delete: Whenever we are using delete from tablename, then automatically deleted data internally stored in buffer. We can get it back by using rollback command. Truncate: When ever we are using truncate...

View Article
Browsing all 11 articles
Browse latest View live




Latest Images