![]() ![]() In Azure Data Studio, create a new query (you can do this from the File menu or on the welcome page).Now that you’ve had a chance to explore the AdventureWorks database, it’s time to dig a little deeper into the product data it contains by querying the Product table. Note: If you’re familiar with the standard AdventureWorks sample database, you may notice that in this lab we are using a simplified version that makes it easier to focus on learning Transact-SQL syntax. The tables are related through primary and foreign keys, as shown here (you may need to resize the pane to see them clearly): ![]() ![]() Close the SQLQuery_1 pane that contains the query and its results.Įxplore the other tables in the database, which contain information about product details, customers, and sales orders.Review the query results, which consist of 1000 rows - each row representing a product that is sold by the fictitious Adventure Works Cycles company.Right-click the SalesLT.Product table and use the SELECT TOP (1000) option to create and run a new query script that retrieves the first 1000 rows from the table.Each column has a name, a data type, an indication of whether it can contain null values, and in some cases an indication that the columns is used as a primary key (PK) or foreign key (FK). Expand the SalesLT.Product table and then expand its Columns folder to see the columns in this table.Note that there are a few tables in the dbo schema, but most of the tables are defined in a schema named SalesLT. Expand the Tables folder to see the tables that are defined in the database.This will connect to the SQL Server instance and show the objects in the AdventureWorks database. Start Azure Data Studio, and in the Connections tab, select the AdventureWorks connection by clicking on the arrow just to the left of the name.We’ll use the AdventureWorks database in this lab, so let’s start by exploring it in Azure Data Studio. In this lab, you will use some basic SELECT queries to retrieve data from the AdventureWorks database. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |