To create a database in SQL the CREATE DATABASE statement is used. The database name should be unique and less than 128 characters.
To create a database in SQL and SQL Server use the command-
Example-
CREATE DATABASE student_db;
To view database in SQL use command-
To Create or Replace existing database in SQL use command-
To list all databases stored in the SQL Server database engine use T-SQL command-
We can also use stored procedure “sp_databases” in SQL server to view the list of all databases, including its size and remarks if any by executing the command-