Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
SQL Server 2014 Development Essentials

You're reading from   SQL Server 2014 Development Essentials Design, implement, and deliver a successful database solution with Microsoft SQL Server 2014.

Arrow left icon
Product type Paperback
Published in Jul 2014
Publisher
ISBN-13 9781782172550
Length 214 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Basit A. Masood-Al-Farooq Basit A. Masood-Al-Farooq
Author Profile Icon Basit A. Masood-Al-Farooq
Basit A. Masood-Al-Farooq
Arrow right icon
View More author details
Toc

Table of Contents (8) Chapters Close

Preface 1. Microsoft SQL Server Database Design Principles FREE CHAPTER 2. Understanding DDL and DCL Statements in SQL Server 3. Data Retrieval Using Transact-SQL Statements 4. Data Modification with SQL Server Transact-SQL Statements 5. Understanding Advanced Database Programming Objects and Error Handling 6. Performance Basics Index

Inserting data into SQL Server database tables


In SQL Server, you use the INSERT statement to add one new row or multiple new rows to an existing table. You can use the INSERT statement to insert data into a particular column, all columns, and IDENTITY columns.

To execute INSERT statements, a user must have at least the INSERT permission assigned on the target table.

The following is the basic syntax for INSERT statements:

[WITH <common_table_expression> [,...n]]
INSERT [TOP (expression) [PERCENT]
[INTO]
table_name | view_name | rowset function | common_table_expression
[WITH table_hints ]
<output_clause>
[(column_list)]
{VALUES (values_list) | select_statement | DEFAULT | execute_statement | dml_table_source
NULL
} | DEFAULT VALUES

The column_list parameter specifies a list of one or more columns in which you are inserting data. The column_list parameter is optional when you are providing a value for each column in the table, and the values appear in the exact order in which the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime