sql server 2005 - Stored Procedure in SQLServer user login -
I write the process for logging where users can send usernames or e-mails for login and password. My process is like this: Process users_login (@ Username varchar (50), @ password varchar (50), @ melith varchar (50), @ ret int output) password, e- Mail, where user name = isnull (@username, blank) or emailid = isnull (@mailid, null) and [password] = @password (@@ rowcount> 0) set @rate = 1 end set and otherwise Start Set @ rate = 0 End End
Is it OK or Amendment
There is a problem in the query itself, you have to bracket The statement must be placed around the or
statement otherwise the statement will always return a line when the user name will have a match in the table: / pre>
Others should not save passwords in clear text Please read something like this
For the style, I personally They would not like this. As others have pointed out that isnull () in this case, it is similar to not using it. You can also reduce the use of @@ puncto ount by setting @ret to the selected statement. If it does not give a line then it will not be set so that it can achieve the same end.
Then I will write it:
Comments
Post a Comment