How to check if my table is empty from C#?
I have something like:
public MySqlConnection con;
public MySqlCommand cmd;
con = new MySqlConnection(GetConnectionString());
con.Open();
cmd = new MySqlCommand("SELECT * FROM data;", con);
Or I don't need to call SELECT statement?
Select COUNT(*) from datawould return the number of rows. If it's 0, then it's empty. It would be faster than what you have (if it does have data) because it would not have to return all the data.