JDBC-更新表数据 [英] JDBC-Update table data

查看:126
本文介绍了JDBC-更新表数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,
我有一个财政年度表,其中要在数据库中输入近100个字段.数据插入正确进行.如果假设用户修改了在特定字段中输入的数据,则更改应在后端的相应文件中进行...这是没有发生的.... kindly help

Dear All,
I have a financial year table where i have almost 100 fields to be entered in the database.Data Insertion is happening properly. If suppose the user modifies the data entered in particular field ,the change should happen in the appropriate filed in the backend...which is not happening....kindly help

推荐答案

嘿,您想更新表的100个数据中的垂直字段..

所以是由
完成的
如果假设您在表中有4个字段,例如名称,地址,电话,城市.

您在DB中有50个条目
所以首先将任何字段设置为主键,例如name就是主键...
那么sql字符串将是..

更新table_name设置地址值(新地址),其中name ="nikhil";

谢谢

尼基尔(Nikhil)
hey you want to update a perticular field in 100 data of table..

so that is done by

if suppose u have 4 field in table like name,address,phone,city.

and you have 50 entrys in DB
so first of all set any field as primary key like name is primary key...
then sql string will be..

update table_name set address values(new_address) where name="nikhil";

Thanks

Nikhil


这篇关于JDBC-更新表数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆