Tuesday 21 August 2012

How to Create Database?

Database can be created using following ways:-
  1. Using SQL Script
  2. Using Wizard
SQL Script:-
Create Database statement is used to create a database in SQL Server.

Syntax: 
Following SQL Syntax helps to create a database
 

CREATE DATABASE <database_Name>
 
Sample:
Execute the following Query at SQL Server management studio, it will create a Database named as “TestDB”
 
CREATE DATABASE TestDB

Wizard:-
 
Database can be created using SQL Server management studio, follow the steps given below to create a DB
 
1.    Open SQL Server management studio from Program menu (start Menu)
 
 
2.    Login/connect to the SQL Server by providing proper credentials
 
 
3. After connected to the server, Select the Database Node in the Object Explorer --> Right Click on the Database node, Select “New Database” (refer the Exhibit given below for further reference)
 
 
4.    New Database Wizard will appear as shown below,
5.    Enter the name of the database in “Database name” text field.
 

6.    Click Ok to create the database 

7.    Once it is created, it will be display under database node as shown below

 To Know More about Database, Refer the Article posted at,
http://blog-sqllearning.blogspot.in/2012/08/what-is-database.html
 

No comments:

Post a Comment