Return to parameters in SQL Server

xiaoxiao2021-03-06  108

Author: Internet Prodigal Box (formerly known as littlehb) http://blog.9cbs.net/littlehb/

Create Procedure Loginuser @loginun char (50) Output, @loginpw char (40) ASIF @loginpw = (select [password] from users where username = @ loginun) Return 0; else return -1;

Go

To log in the value, define it to Output, the corresponding SQLCommand's parameter definition is also defined in the parameterDirect.inputoutput type, which is returned when the value of loginun is changed in the stored procedure. It can be judged that the return value of SQLCommand.executeNonQuery () is successful, and it is successful, less than 0 means failure.

转载请注明原文地址:https://www.9cbs.com/read-100693.html

New Post(0)