Help
-
Search
-
Members
-
Calendar
Full Version:
Update a row in a database
HTMLHelp Forums
>
Programming
>
Databases
Elize
Oct 5 2008, 03:21 AM
Hi
I have created a database and can add a new person, but when a person changes a record and presses the update button, how do I update only that record that has been changed?
Can someone please help me.
Brian Chandler
Oct 5 2008, 07:01 AM
What database? For (My)SQL it's something like
UPDATE table WHERE person='fred';
but you need to look in the manual.
Remote DBA
Jan 23 2009, 08:58 AM
Hi Brian.
Actually any DBMS supports
ANSI-92 SQL Standard
which means statements like
UPDATE table_name
SET col_name1 = expression1, col_name2 = expression2, ....
[ WHERE expression ]
UPDATE Employee
SET salary = salary * 1.25
WHERE name = 'Bob'
UPDATE Order
SET id = id + 3, part = 'updpard'
WHERE part LIKE 'PO-%'
will work everywhere...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here
.
Invision Power Board © 2001-2009
Invision Power Services, Inc.