且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用新用户输入更新数据库中的列?

更新时间:2022-11-30 07:45:29

您没有说出哪个数据库系统,但是(与INSERT语句不同) UPDATE语句不会在列和值周围使用括号。
You don't say which database system, but (unlike an INSERT statement) an UPDATE statement doesn't use parentheses around the columns and values.


更新语句不需要括号。为什么不尝试在数据库中创建一个存储过程,以便你不能先测试它然后调用前端的程序?



更新[table_name] set [Field_name ] = [Object] where [Field_name] = [value]



也只是一个抬头,尝试使用参数来避免sql注入。
Update statement doesn't need a parenthesis. Why not try creating a stored procedure in the database so that you cant test it first there then call the procedure in the front end?

Update [table_name] set [Field_name] = [Object] where [Field_name] = [value]

also just a heads up, try to use parameters to avoid sql injection.