Sunday, September 15, 2024

How to create database in SQL server?

 In this article, we will discuss two ways of creating database in SQL Server.

1) from GUI (graphical user interface)

2) from query 


1) GUI method

First of all, right click on databases as shown in figure and then option pops up. Click on "New Database" as shown below.


A new window is seen now as shown below:


Provide Name of database and then click OK. 

Now, your new database is created.


2) Using query



Click in "New Query". A new query analyzer will be displayed.

Type the following query in query analyzer

CREATE DATABASE YourDatabaseName;






Click Execute (or press F5) to run the query. Database will be created.




























This Is The Oldest Page


EmoticonEmoticon

Create Table in Sql using Select Statement

In SQL Server, one can create a table using SELECT statement. Let's learn how we do it. Let's take a scenario where you are ordering...