Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The SQL Workshop

You're reading from   The SQL Workshop Learn to create, manipulate and secure data and manage relational databases with SQL

Arrow left icon
Product type Paperback
Published in Dec 2019
Publisher Packt
ISBN-13 9781838642358
Length 288 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Authors (3):
Arrow left icon
Prashanth Jayaram Prashanth Jayaram
Author Profile Icon Prashanth Jayaram
Prashanth Jayaram
Frank Solomon Frank Solomon
Author Profile Icon Frank Solomon
Frank Solomon
Awni Al Saqqa Awni Al Saqqa
Author Profile Icon Awni Al Saqqa
Awni Al Saqqa
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. SQL Basics FREE CHAPTER 2. Manipulating Data 3. Normalization 4. The SELECT Statement 5. Shaping Data with the WHERE Clause 6. JOINS 7. Subqueries, Cases, and Views 8. SQL Programming 9. Security 10. Aggregate Functions 11. Advanced SQL Appendix

The INSERT Operation

The INSERT operation inserts a record within a table. We have already used the insert operation in the previous chapter, however, in this chapter, we are looking at it in more detail. The following are some important points about the INSERT operation:

  • It is not always essential to provide data for every single column when performing an INSERT operation. The columns can be left blank unless there is a constraint that forbids it. Some columns may even have default or system-generated values.
  • You should not alter the system-generated values.
  • The column values must match the order, data type, and size requirements.
  • The values to be inserted into the table must be enclosed in quotes in the case of strings, date-time, and characters. Numbers should not be enclosed in quotes.
  • If you do not specify the column names in the INSERT statement, your record should have a value for all the columns. Also, you should maintain the sequence of columns in...
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
Banner background image