insert syntax  Inserting data into specific columns

Chapter 7: Adding, Changing, and Deleting Data

Adding new rows with values

This insert statement adds a new row to the publishers table, giving a value for every column in the row:

insert into publishers 
values ("1622", "Jardin, Inc.", "Camden", "NJ")

Notice that the data values are typed in the same order as the column names in the original create table statement, that is, first the ID number, then the name, then the city, and, finally, the state. The values data is surrounded by parentheses and all character data is enclosed in single or double quotes.

Use a separate insert statement for each row you add.





Copyright © 2005. Sybase Inc. All rights reserved. Inserting data into specific columns

View this book as PDF