i have a sql query
select * from old table (update tbl set col1= 2)
query works fine in command line but when used with jdbc it return the value correctly but does not update the values
here is a code snippet
<pre lang="java">
ResultSet rs = st.executeQuery(sql);
i am doing it the proper way?
2) e.g.
i have a 4 column in table
areaid,ROle,approverNo,username
1,role1,1,aaa
1,role2,1,sss
1,role1,2,fgfg
1,role1,3,tyty
1,role2,2,ghg
1,role1,4,sdss
and soo on now if i add a value 1,role1,(select Count(*) from tbl where areaid=1 and role=role1),dfdf it is working fine , what will be the query when i delete let say "1,role1,3,tyty" will i have to reassign approvernum ,and the query when i will update the role?