Sign up for Hasura Newsletter
Loading...

Database

This page shows how to create and drop a database in MS SQL Server Management Studio (SSMS) using Transact-SQL on a Windows2019 Server.

Prerequisite

  • MS SQL Server
  • SQL Server Management Studio

Create a database using T SQL

Syntax

CREATE DATABASE database_name;
  • Open SSMS and connect to the Database Engine.
  • Click New Query from the top ribbon bar.
  • In the Query editor, enter the following command and then press Execute.
CREATE DATABASE HASURA;
GO
  • GO is not a T-SQL statement. It is a command that indicates the end of a batch of T-SQL statements to Server utilities.

Create a database

Expand Databases in the Object Explorer on the left, the database HASURA is displayed.

Note: If the new database is not displayed automatically, click the Refresh icon in the Object Explorer.

Drop a Database

To drop a database from a schema or from an instance of SQL Server, run the following command:

DROP DATABASE database_name;

When you drop a database, the database is removed from the SQL Server instance.

  • You cannot remove System databases.
  • To drop multiple databases, you can provide a comma-separated list of database names.
Did you find this page helpful?
Start with GraphQL on Hasura for Free
  • ArrowBuild apps and APIs 10x faster
  • ArrowBuilt-in authorization and caching
  • Arrow8x more performant than hand-rolled APIs
Promo
footer illustration
Brand logo
© 2024 Hasura Inc. All rights reserved
Github
Titter
Discord
Facebook
Instagram
Youtube
Linkedin