Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert statment

Status
Not open for further replies.

ashz

Programmer
Dec 9, 2002
43
ES
How can I insert one value ("n") to one field in all the records.
 
To "insert" a field, you use the "update" command, since the record is already in the database.

eg.
update NamesTable set FirstName = 'H' where UserID = '12'

If you don't already have a record in the database (in the above example, the record can be identified from its field UserID), you would need to insert the record

eg.
insert into NamesTable
(UserID, FirstName)
values
('12', 'H')
 
to do all fields currently in the database:
update NamesTable set field_to_update = 'n' ______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top