Check if record in a table exist in a database through ExecuteNonQuery

前端 未结 5 464
心在旅途
心在旅途 2020-12-03 14:06

in my program i need to check if a record in the database already exists in the table using the if statement. using c# i am trying to do this through an sql con

5条回答
  •  时光说笑
    2020-12-03 14:54

    I would use Select Top 1 Id rather than the count(*) because it can be much faster

提交回复
热议问题