Skip to content

Latest commit

 

History

History
72 lines (48 loc) · 4.67 KB

tutorial-writing-transact-sql-statements.md

File metadata and controls

72 lines (48 loc) · 4.67 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic ms.custom helpviewer_keywords monikerRange
T-SQL Tutorial: Write Transact-SQL statements
This tutorial is intended for users who are new to writing SQL statements. It helps new users get started by reviewing some basic statements for creating tables and inserting data.
MikeRayMSFT
mikeray
randolphwest
04/19/2023
sql
t-sql
quickstart
intro-quickstart
ignite-2024
Transact-SQL statements, tutorials
Transact-SQL tutorials
tutorials [Transact-SQL]
>=aps-pdw-2016 || =azuresqldb-current || =azure-sqldw-latest || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current || =fabric

Tutorial: Write Transact-SQL statements

[!INCLUDEsql-asdb-asdbmi-pdw-fabricsqldb]

Note

The Get Started Querying with Transact-SQL learning path provides more in-depth content, along with practical examples.

Welcome to the Writing [!INCLUDEtsql] Statements tutorial. This tutorial is intended for users who are new to writing SQL statements. It helps new users get started by reviewing some basic statements for creating tables and inserting data. This tutorial uses [!INCLUDEtsql], the [!INCLUDEmsCoName] implementation of the SQL standard.

This tutorial is intended as a brief introduction to the [!INCLUDEtsql] language and not as a replacement for a [!INCLUDEtsql] class. The statements in this tutorial are intentionally simple, and aren't meant to represent the complexity found in a typical production database.

Note

If you are a beginner you might find it easier to use [!INCLUDEssManStudioFull] instead of writing [!INCLUDEtsql] statements.

Find more information

To find more information about any specific statement, either search for the statement by name, or use the contents to browse the language elements listed alphabetically under Transact-SQL Reference (Database Engine). Another good strategy for finding information is to search for key words that are related to the subject matter you are interested in. For example, if you want to know how to return a part of a date (such as the month), search the index for dates [SQL Server], and then select dateparts. This takes you to the article DATEPART (Transact-SQL). As another example, to find out how to work with strings, search for string functions. This takes you to the article String Functions (Transact-SQL).

What you will learn

This tutorial shows you how to create a database, create a table in the database, insert data into the table, update the data, read the data, delete the data, and then delete the table. You will create views and stored procedures and configure a user to the database and the data.

This tutorial is divided into three lessons:

Requirements

To complete this tutorial, you don't have to know the SQL language, but you should understand basic database concepts such as tables. During this tutorial, you will create a database and create a Windows user. These tasks require a high level of permissions; therefore, you should log in to the computer as an administrator.

Your system must have the following installed:

Next steps

The next article teaches you how to create database objects.

Go to the next article to learn more:

[!div class="nextstepaction"] Lesson 1: Create and query database objects