C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » .NET »

How to check a value in the Table


Posted Date: 04 Nov 2009      Posted By: Narasimha      Member Level: Bronze     Points: 1   Responses: 2



Hi All,

I want C# source code for insert the values in the SQL table before that i want to check whether the value is available or not ?





Responses

Author: Anil Kumar Pandey    04 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

suppose i want to check the ID value then get its count..


Select count(*) where Id=10

if it is grater than 0 means the value is already present and if it is 0 you can use INSERT statement.

Thanks & Regards
Anil Kumar Pandey



Author: Lalji    04 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

try this link

http://blog.ysatech.com/post/2009/08/11/How-to-check-if-column-exists-in-SQL-Server-table.aspx



Post Reply
You must Sign In to post a response.
Next : How to use menu dynamically
Previous : To display information in crystal report for tables having relationship
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use