Low cost ecommerce web development India flash website design

The INSERT Statement

SQL INSERT statements add one or more new rows to a table The INSERT

statement has two variations The first variation adds one row by assigning

values to a specified list of columns m a specified table. The values you want

to insert follow a VALUES statement. You put parentheses around both the

field list and the values list.

For example:

55

INSERT INTO tablename (field1 [, field2] ...)

VALUES (value1 [, value2] ...)

You must provide a value for all fields that cannot accept a null value and do

not have a default value. You do not have to provide values for identity

columns.

The second variation lets you add multiple rows using a SELECT query in

place of the VALUES list, as follows:

INSERT INTO tablename (field1 [, field2] ...) SELECT query

If you're inserting data into all the columns in the target table, you can omit

the field list. The SELECT statement you use to obtain the data you want to

insert can include any clause or condition discussed in the previous section,

including calculated fields and a GROUP BY clause.

freelance web designer India web development

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73