i want to know what is the wrong in this query I want to select all rows for 1 column
string command = "select money from User_Data";
SqlCommand update_money = new SqlCommand(command, con_string.con);
SqlDataReader money_reader;
money_reader = update_money.ExecuteReader();
You’re on the right track – now once you have the data reader, you need to iterate over the rows:
This assumes your
moneycolumn would be of typedecimal(x,y)ormoneyon SQL Server.