1.1: Create Database

Start by creating a folder outside of an existing git repository. Name the folder "SQL_Library."

  1. Open Visual Studio.

  2. Go to View, Open SQL Server Object Explorer.

  3. Open up the (localdb)\MSSQLLocalDB.

  4. Click on Databases. The New Query button should now be available (circled in purple in the screenshot below). A new window will appear. This is where you will write your SQL query (green box).

  5. Save the file in your SQL_Library folder as 0.01_CREATE_DB.sql.

  6. In 0.01_CREATE_DB.sql, write a query that creates a database called SQL_Library. To run the query, press the play button (circled in yellow). Make sure to click the blue arrow button (circled in aqua) every time you make a change to your database to refresh the view in your SQL Server Object Explorer window.

To see the solution for this challenge, click on 1.12 Solutions. Then, continue to Part 1.2: Drop Database

Last updated