How to create Database in SQL Server Using multiple methods

Опубликовано: 07 Октябрь 2024
на канале: it Tips
38
0

In today session we are going to explore the use of SQL (Structured Query Language) commands for creating database. These operations can also be performed using SSMS interface. But the basic idea to learn these command is to interact with database systems using software’s or can say applications. We will learn here the use of GO statement in SQL server query language.
Related to the creation of database this session will explore the basic data types that are used in SQL server. We can execute multiple SQL statement in single query editor window with the help of semicolon. Each query is ended with semicolon. If we have only one query to be executed in query editor then there is no need to terminate the query with semicolon. There are commonly two methods that are used for the creation of database.
1. Using SQL
2. Using Object Explorer
In this session we will also learn that how to get the list of all available databases from the server. For this purpose use command select name from master.sys.databases. The other way to fetch the entire list is to execute the predefined stored procedure. While creating database "create database" is keyword after that we can provide any valid name of the database. Here valid name means the valid identifier which will not contain any special symbol or white spaces.