Hello, community
I have a variable that contains the looping value and I want to check that value is present in the MySql Database table or not.
For example:
Name = Jamal
MySql Database :
User Name
Jamal
Mohit
Aman
Karan
If the variable value i.e Jamal already exist in the table then Ok but if not then need to insert it into the data table
What will be the if the condition for this?
Thanks in advance
Best Regards,
Vrushali
Srini84
(Srinivas Kadamati)
2
@Srini84 I have MySql database and I want to check in it.
Srini84
(Srinivas Kadamati)
4
@Vrushali_Gave
write a Execute Query like below
Select * from TableName WHERE User Name = ‘Jamal’-> Output is Datatable
Now in IF Condition write as below
Datatable.Rows.Count > 0
Then-> Value is present
Else → Value not present
Hope this helps you
Thanks
2 Likes
system
(system)
Closed
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.