using System.Data.SqlClient;
public static void Main()
string databaseInfo = "connection info";
SqlConnection connection = new SqlConnection(databaseInfo);
string SqlCommand = "do this, I only need one result";
SqlCommand command = new SqlCommand();
command.Connection = connection;
command.CommandText = SqlCommand;
result = (string)command.ExecuteScalar();