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...