问题描述
嗨开发者,
i使用函数将值插入到postgreSQL表中,插入但我得到结果-1为什么它来了-1它应该更大然后0吧。请帮助我。
PgsqlCommand.Executingnonquery(); == - 1在插入后即将到来。
对不起语法错误
问候,
Aravind G
Hi Developers,
i am inserting values into postgreSQL tables using functions, its inserting but i am getting result -1 Why it is coming -1 it should come greater then 0 right.please help me in this.
PgsqlCommand.Executingnonquery();==-1 is coming after inserting.
Sorry for the grammer mistakes
Regards,
Aravind G
推荐答案
对于UPDATE,INSERT和DELETE语句,返回值是受命令影响的行数。对于所有其他类型的语句,返回值为-1。
For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1.
您说您正在使用函数,函数既不是UPDATE,也不是INSERT,也不是DELETE声明,因此返回值为-1。
You said that you're using functions, and a function is neither an UPDATE, nor an INSERT, nor a DELETE statement, so the return value is -1.
这篇关于PostgreSQL插入但结果是-1即将到来?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!