Category: SQL Server (page 3 of 3)

How to Create a View in SQL Server

To create a view in SQL Server:

  1. Open a new query by clicking the New Query button in the SSMS toolbar
  2. Type or paste a CREATE VIEW statement (example below)
  3. Run the script

The view will now be created in the database. You will be able to see it under the Views node in the Object Explorer.

You can now use SELECT statements against the view in future queries.

Below are screenshots of the above steps.

Continue reading

How to Create a Stored Procedure in SQL Server

To create a stored procedure in SQL Server:

  1. Click New Query on the SSMS toolbar
  2. Type (or paste) a CREATE PROCEDURE statement (example below)
  3. Click the Execute button on the toolbar

This will add the stored procedure to the database. You can see it under the Stored Procedures node in the Object Explorer.

Below are screenshots and more detail for the above steps.

Continue reading

What Is SQL Server Management Studio?

SQL Server Management Studio (SSMS) is the main console of SQL Server.

Screenshot of SQL Server Management Studio (SSMS) in SQL Server 2014.

SQL Server Management Studio (SSMS) is the main console of SQL Server.

SQL Server Management Studio allows you to create and manage your databases as well as administer your SQL Server configuration.

Continue reading

How to Create a Table in SQL Server

To create a table in SQL Server using the GUI:

  1. Ensuring that the right database is expanded in Object Explorer, right click on the Tables icon and select Table... from the contextual menu
  2. A new table will open in Design view. Add the columns, their data types, and column properties.
  3. Save the table (either from the File menu, or by right-clicking on the table tab and selecting Save Table1)

The table will appear in the Object Explorer under the Tables icon for the applicable database.

Continue reading

How to Create a Database in SQL Server

To create a database in SQL Server using the GUI:

  1. From the Object Explorer, right click on Databases and select New database...
  2. Name the database, adjust settings if required, then click OK

Once you’ve created the database, you can create tables and other database objects. You can also modify any database properties as required.

Continue reading

Newer posts

© 2018 Database.Guide

Theme by Anders NorenUp ↑