How to findout the whether given is record is exists in table or not?

Posted by Iluvdotnetfunda under C# on 6/15/2012 | Points: 10 | Views : 2195 | Status : [Member] | Replies : 6
Hello Friends,

How to find whether the record is existed in the database or not.
Plzz help me.

Thanks




Responses

Posted by: Sheonarayan on: 6/15/2012 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Read this article http://www.dotnetfunda.com/articles/article1590-how-to-check-for-the-existence-of-record-into-the-database.aspx

thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sowbud on: 6/20/2012 [Member] Starter | Points: 25

Up
0
Down
http://forums.asp.net/ is a good forum to learn about .NET . If you have any doubts you can directly go there.

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muralidosscm on: 7/4/2012 [Member] Starter | Points: 25

Up
0
Down
IF EXISTS(SELECT * FROM TBL_Subscribers WHERE email = @adres)
BEGIN
--emaild exist, so write code accordingly
END
ELSE
BEGIN
--emaild does not exist, so write code accordingly
END

Regards
Muralidoss M

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Johnbhatt on: 7/8/2012 [Member] Starter | Points: 25

Up
0
Down
There are so many ways to do so.

Question is from where do you want to check?

Visual Studio Web Form, SSMS, or any other place. Please clear your question and reply.

John Bhatt
Glad to Know, Free to Share.....
http://www.johnbhatt.com

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ranjeet_8 on: 7/31/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
Refer this url.
http://www.java2s.com/Tutorial/Oracle/0040__Query-Select/EXISTSandNOTEXISTSVersusINandNOTIN.htm

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kundan64 on: 1/25/2013 [Member] Starter | Points: 25

Up
0
Down
Create query as: Select COUNT(*) from employee WHERE ename = ''yourvalue
and execute this query as ExecuteScalar.

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response