简体   繁体   English

如何在特定行中分别插入列值?

[英]How can I insert column values in a particular row separately?

I have a table with columns {a, b, c} and for row x I want to add a value for a, then a value for b, then a value for c all in separate activities as the user progresses through my app (for another user, values for a, b, and c would be added separately to a row y). 我有一个带有列{a,b,c}的表,对于x行,我想为a添加一个值,然后为b添加一个值,然后为c添加一个值,这些都在用户通过我的应用程序进行逐步移动时进行(对于另一个用户,a,b和c的值将分别添加到行y)。 How can I do this? 我怎样才能做到这一点?

可以插入a,然后b和c必须是该行的更新

i think you need to add a primary key to your table {a,b,c,key_column} 我认为您需要向表{a,b,c,key_column}添加主键

and then you can use below.. 然后您可以在下面使用

To update a:- 更新:-

UPDATE table_name
SET a=valueA
WHERE key_colum=key_value;

To update b:- 更新b:-

UPDATE table_name
SET b=valueB
WHERE key_colum=key_value;

To update c:- 更新c:-

UPDATE table_name
SET c=valueC
WHERE key_colum=key_value;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何分别对二维数组的行中的值求和,并分别对列中的值求和? (爪哇) - How do I sum the values in the row of a 2D array separately, and sum the values in the column separately? (Java) 如何使用列表在特定列中插入值 - how to insert values in a particular column using list 如何选择特定列sql android的最后一行值 - how to select last row values of particular column sql android 如何从Amazon DynamoDB中的特定列检索所有值? - How can I retrieve all the values from a particular column in amazon DynamoDB? 获取 Hbase 中特定行的所有列值 - Getting all the column values for a particular row in Hbase 如何在不使用hibernate覆盖以前数据的情况下为特定列插入新行 - How to insert new row for a particular column without overwritting previous data using hibernate 如何在JAVA中使用文本文件附加到特定行? - How can I append to a particular row using text file in JAVA? 如何在第二列或特定列中插入jface TreeViewer? - How to insert jface TreeViewer in second or in particular column? Java - 如何在SQLite中插入值? - Java - How can I INSERT values in SQLite? 如何删除具有特定列号和行号的所有值? - How can I delete all values that have a specific column and row number?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM