which SQL statement to use? To modify data?
Posted: Tue Jan 06, 2004 10:54 pm
I wanna modify the values of a row in my table called book.
When i insert a new row i use
But when i want to modify the value of a row from a GUI mode and then want to save the new value...which statement i do use?
If i use the above statement it does not let me to do so..coz primary key cannot be duplicated. so, when i want to change a row where the primary key value is 3...i got the existing data...make a change and then when i want to save the value using INSERT........................statement...it does not change the value..as primary key value 3 already exists.
So, it cannot overwrite the existing value..
Which statement to use then?
When i insert a new row i use
Code: Select all
INSERT INTO TABLE(Column1, Column2....) VALUES (23,'topu');If i use the above statement it does not let me to do so..coz primary key cannot be duplicated. so, when i want to change a row where the primary key value is 3...i got the existing data...make a change and then when i want to save the value using INSERT........................statement...it does not change the value..as primary key value 3 already exists.
So, it cannot overwrite the existing value..
Which statement to use then?