How to Create New DataBase SQL server


Here we’ll learn about how to create new database sql server. Database is like a content pool, which is amalgamated, jotted together, or grouped into separate clusters having some kind of relation, or no relation in between themselves.

These groups are called as tables. Tables generically contain fields which define what kind of data they can hold. You can take the idea of fields as a type definition, or placeholder for the content that comes in them. For example, a field of string can never contain an integer in it. And if a field is stated as null, it is bound to contain some data, with every record being inserted in that table.

Step # 1 – Creating a new database

To create a database in sql server, right click on databases, and click on new database. This will show a pop-up the create new database in sql server window, which will ask you for a database name. Type in your desired database name.

Creating new database

Step # 2 – Exploring database options

Now, in order to customize the settings of your database, click on the three dots (…) and see the list of options that you get. I will work on the default basic settings. Click okay to come back to your database.

exploring database options

Step # 3 – Changing the database collation

Click on options to see what collations, you can designate your database. Here is the list of collations, SQL server supports. Hit okay, when your database settings are completed.

database collation

Step # 4 –Inserting a table in the database

Now right click on the database that you have created, and click new table. Add two fields named Id, and Name in the table. The type of Id, is short integer, and Name, is Variable Characters of length 50. Make sure, both are not null.

inserting tables in database

Step # 5 –Populating your database tables

Now right click on the table and click on edit 200 rows. Start populating your database table with some records.

Populating the database table

And that is how you create a database in sql server.