Master W3Schools SQL Server INSERT INTO Syntax Fast Guide

Logan Jul 13, 2026

SQL Server is a powerful relational database management system (RDBMS) developed by Microsoft. A fundamental operation in SQL is the insertion of data into tables. W3Schools, a renowned website known for its programming and web development tutorials, provides an easy-to-understand guide for SQL Server INSERT INTO command. Let's delve into this topic to help you master data insertion.

Working with the INSERT statement in SQL Server
Working with the INSERT statement in SQL Server

Before we get started, ensure that you have an understanding of SQL Server and have access to SQL Server Management Studio (SSMS) or a similar environment to run your SQL statements. Let's now explore how to use the SQL Server INSERT INTO command with W3Schools as our roadmap.

How To Insert Results From Stored Procedure To A Temp Table In SQL Server?
How To Insert Results From Stored Procedure To A Temp Table In SQL Server?

Understanding SQL Server INSERT INTO Command

The SQL Server INSERT INTO command is used to insert new records into a table. It has the following basic syntax:

an image of the server list
an image of the server list

INSERT INTO table_name (column1, column2, ...) VALUES (value1, value2, ...)

Inserting a Single Row

Sql Cheat Sheet, Learn Sql, Learn Web Development, Excel Tutorials, Sql Server, Career Options, Data Analyst, Data Scientist, Data Analysis
Sql Cheat Sheet, Learn Sql, Learn Web Development, Excel Tutorials, Sql Server, Career Options, Data Analyst, Data Scientist, Data Analysis

To insert a single row into a table, use the following syntax:

INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country) VALUES ('Cardinal', 'Tom B. Erichsen', 'Skagen 21', 'Stavanger', '4006', 'Norway')

The above statement inserts a new record into the 'Customers' table with the provided columns and values.

Using CONCAT_WS() in SQL Server | My Tec Bits
Using CONCAT_WS() in SQL Server | My Tec Bits

Inserting Multiple Rows

You can also insert multiple rows at once using the following syntax:

INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country) VALUES ('Cardinal', 'Tom B. Erichsen', 'Skagen 21', 'Stavanger', '4006', 'Norway'), ('Berger', 'Steve Smith', 'Berger Blvd 67', 'Paris', '75001', 'France')

- The Knowledge Hub
- The Knowledge Hub

This statement inserts two new records into the 'Customers' table.

Using SELECT to Insert Data

SQL RIGHT() Explained with Examples | Extract Characters from the Right in SQL Server
SQL RIGHT() Explained with Examples | Extract Characters from the Right in SQL Server
SQL Basics Cheat Sheet for Beginners | Learn SQL Fast 💻
SQL Basics Cheat Sheet for Beginners | Learn SQL Fast 💻
SQL
SQL
Concatenate SQL Server Column Values with CONCAT()
Concatenate SQL Server Column Values with CONCAT()
Basic sql commands
Basic sql commands
SQL Sheatsheet! 👍
SQL Sheatsheet! 👍
Top SQL Queries Every Fresher Should Practice
Top SQL Queries Every Fresher Should Practice
SQL Quick Notes Cheat Sheet | SQL Queries, Joins, Functions & Database Commands for Beginners
SQL Quick Notes Cheat Sheet | SQL Queries, Joins, Functions & Database Commands for Beginners
an elephant with the words,'how to create your first data base '
an elephant with the words,'how to create your first data base '
7 SQL Commands Every Beginner Must Know
7 SQL Commands Every Beginner Must Know
SQL Server User Defined Server Roles
SQL Server User Defined Server Roles
SQL LOWER() Explained with Examples | Convert Text to Lowercase in SQL
SQL LOWER() Explained with Examples | Convert Text to Lowercase in SQL
SQL JOINS Made Easy 🔗 | INNER, LEFT, RIGHT & FULL JOIN with Examples
SQL JOINS Made Easy 🔗 | INNER, LEFT, RIGHT & FULL JOIN with Examples
an info sheet describing the different types of web pages
an info sheet describing the different types of web pages
SQL JOINS Explained for Behinners
SQL JOINS Explained for Behinners
SQL Cheat Sheet for Beginners | Essential Commands & Queries
SQL Cheat Sheet for Beginners | Essential Commands & Queries
How to Learn SQL Fast | Beginner Guide 🚀
How to Learn SQL Fast | Beginner Guide 🚀
SQL Cheatsheet In 2026 🚀
SQL Cheatsheet In 2026 🚀
SQL WHERE clause Explained clearly for beginners
SQL WHERE clause Explained clearly for beginners
a poster with the words and numbers in it
a poster with the words and numbers in it

SQL Server allows you to insert data from one table to another using the SELECT statement.

Inserting Data from Another Table

To insert data from one table to another, use the following syntax:

INSERT INTO Customers_New (CustomerName, ContactName, Address, City, PostalCode, Country) SELECT CustomerName, ContactName, Address, City, PostalCode, Country FROM Customers

This statement creates a new table 'Customers_New' and inserts all records from the 'Customers' table.

Inserting the Result of an Expression

You can also insert the result of an expression. For example, to insert the count of customers from each city, use the following:

INSERT INTO CityCount (City, Count) SELECT City, COUNT(*) FROM Customers GROUP BY City

This statement inserts a new table 'CityCount' with the city and the count of customers for each city.

The SQL Server INSERT INTO command offers a powerful way to insert data into tables, making it an essential operation in database management. W3Schools serves as an excellent resource for mastering this command and many others in the SQL Server arsenal. Keep practicing and exploring new features to become an SQL Server expert.