string sql = "select top 1 "column name1" from table where column name2= 123456";
using (SqlConnection conn = new SqlConnection(connString))
{
SqlCommand cmd = new SqlCommand(sql, conn);
string sql = "select top 1 "column name1" from table where column name2= 123456";
using (SqlConnection conn = new SqlConnection(connString))
{
SqlCommand cmd = new SqlCommand(sq……