Does an UPDATE create a record???

  • Thread starter Thread starter chemicals
  • Start date Start date
C

chemicals

Will an UPDATE query create the record if it is not in the table yet?
My update says it runs with NO ERROR but yet there is no record in the
table...

Do I need to set up a SELECT and then an INSERT if the records do not exist
first ???
 
Will an UPDATE query create the record if it is not in the table yet?
My update says it runs with NO ERROR but yet there is no record in the
table...

Do I need to set up a SELECT and then an INSERT if the records do not exist
first ???

An Update query will only update data in an existing record, in an
existing table.

If you wish to add a new record to an existing table, you need to use
an Append query.
Create a new query.
Click on Query + Append Query
Continue designing your query.
 
Updating an empty set (because no record satisfy the WHERE clause) is
considered as if no job is to be done, not as an error.

With JET, you can append a new record with an UPDATE statement, if you
**update the unpreserved side of an outer join**. MS SQL Server does not
allow you to update the unpreserved side of an outer join. That technique is
not part of the SQL standard.




Vanderghast, Access MVP
 
Back
Top