Simple SQL update doesn't work :( (Probebly easy error)
Hello!
I'v spent my day trying to understand the built in derby database SQL thingy
And Im Finaly starting to get it! :D
Anyways, I get this problem when Im trying to modd a value:
Code:
Collums 'PWNSOME' is either not in any table in the FROM list or appears..
What Im trying to do is set the Firstname collumn value, on All the rows which have the id=8, to Pwnsome.
Now that doesnt work very well :(
Heres my code:
Code:
Statement statement = conn.createStatement();
statement.execute("select * FROM APP WHERE ID = 8");
statement.execute("UPDATE APP SET FIRSTNAME = Pwnsome");
What am I doing wrong?