Ms Sql Server

SQL Server Introduction

18-Apr-2009 17:51:24

Microsoft SQL Server is a relational database management system (RDBMS). Users of small to medium databases appreciate the system, in part because it supports Structured Query Language (SQL). Lately users of large enterprise databases have started taking advantage of its features as well. If you'd like to find out more, check out the tutorials in this section.



To create a database in SQL, use the following formula:

CREATE DATABASE DatabaseName

Here is an example:

CREATE DATABASE BethesdaCarRental;

If you want the name of the database to be in different words, include them in square brackets. Here is an example:

CREATE DATABASE [Bethesda Car Rental];

If you want the name of the database to be in different words, include them in square brackets.
   

To start from a sample code, open an empty Query window and display the Template Explorer. From the Template Explorer, expand Database. Drag Create Database and drop it in the Query window:

-- =============================================
-- Create database template
-- =============================================
USE master
GO

-- Drop the database if it already exists
IF  EXISTS (
    SELECT name
        FROM sys.databases
        WHERE name = N''
)

CREATE DATABASE
GO


 Reply Comment
 
 
Your name
Website http://
Comment
   
Image verification code
Retype image code here
   
   

Index : Ms Sql Server