Thursday, June 28, 2007

The Other Insert Query

If you turn an insert query from design view into SQL view, it will look like this

INSERT INTO participants ( projectid, person )
SELECT 1002471 AS Expr1, '1453703' AS Expr2;

Now the select statement is a bit ugly for a single line entry. Following is a more elegant way to add values.

Insert into participants (projectid, person) values ( 1002471,'1453703')

No comments: