Events
Mar 31, 11 PM - Apr 2, 11 PM
The ultimate SQL, Power BI, Fabric, and AI community-led event. March 31 - April 2. Use code MSCUST for a $150 discount. Prices go up Feb 11th.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to: SQL Server Azure SQL Database Azure SQL Managed Instance Azure Synapse Analytics Analytics Platform System (PDW)
Many of the code examples in Importing and Exporting Bulk Data require a special-purpose test table named myTeam. Before you can run the examples, you must create the myTeam table in the HumanResources schema of the AdventureWorks2022
database.
Note
AdventureWorks2022
is one of the sample databases in SQL Server.
The myTeam table contains the following columns.
Column | Data type | Nullability | Description |
---|---|---|---|
EmployeeID | smallint | Not null | Primary key for the rows. Employee ID of a member of my team. |
Name | nvarchar(50) | Not null | Name of a member of my team. |
Title | nvarchar(50) | Nullable | Title the employee performs on my team. |
Background | nvarchar(50) | Not null | Date and time the row was last updated. (Default) |
To create HumanResources.myTeam
Use the following Transact-SQL statements:
--Create HumanResources.MyTeam:
USE AdventureWorks2022;
GO
CREATE TABLE HumanResources.myTeam
(EmployeeID smallint NOT NULL,
Name nvarchar(50) NOT NULL,
Title nvarchar(50) NULL,
Background nvarchar(50) NOT NULL DEFAULT ''
);
GO
To populate HumanResources.myTeam
Execute following INSERT
statements to populate the table with two rows:
USE AdventureWorks2022;
GO
INSERT INTO HumanResources.myTeam(EmployeeID,Name,Title,Background)
VALUES(77,'Mia Doppleganger','Administrative Assistant','Microsoft Office');
GO
INSERT INTO HumanResources.myTeam(EmployeeID,Name,Title,Background)
VALUES(49,'Hirum Mollicat','I.T. Specialist','Report Writing and Data Mining');
GO
Note
These statements skip the fourth column, Background
. This has a default value. Skipping this column causes this INSERT
statement to leave this column blank.
Events
Mar 31, 11 PM - Apr 2, 11 PM
The ultimate SQL, Power BI, Fabric, and AI community-led event. March 31 - April 2. Use code MSCUST for a $150 discount. Prices go up Feb 11th.
Register todayTraining
Module
Create a Dataverse table for the machine ordering app - Online workshop - Training
Learn about Microsoft Dataverse tables and columns and how to connect data to a canvas app.