I am writing code that inserts a new record into a database, Later on in the code I want to be able to pull up that record and update some of the fields in that record. I am not sure how to get started doing this. Does anyone have an example? Here is what I have come up with
UPDATE tablename
SET fieldname = 'somevalue'
SET fieldname2 = 'somevalue2'
.
.
.
How do I pull up the correct record to update though. Can I throw a where clause in the update statement like
UPDATE tablename
SET fieldname = 'somevalue'
SET fieldname2 = 'somevalue2'
.
.
.
WHERE idnumber = '12345'(primary key of the record)
Any help is certainly appreciated. Thanks in advance
UPDATE tablename
SET fieldname = 'somevalue'
SET fieldname2 = 'somevalue2'
.
.
.
How do I pull up the correct record to update though. Can I throw a where clause in the update statement like
UPDATE tablename
SET fieldname = 'somevalue'
SET fieldname2 = 'somevalue2'
.
.
.
WHERE idnumber = '12345'(primary key of the record)
Any help is certainly appreciated. Thanks in advance