Find lowest mark from student table to label using c#

Jayakumars
Posted by Jayakumars under C# category on | Points: 40 | Views : 1209
Step1

Sql Prcedure

Create Proc TestQry
as
Select TOP(1) Salary,Department from employee group BY Department,salary order BY Salary


Step 2

protected void bt1_Click(object sender, EventArgs e)
{
try
{
con.Open();
SqlCommand sqlcmd = new SqlCommand("TestQry", con);
lblMin.Text = " Min Salary : " + Convert.ToDecimal(sqlcmd.ExecuteScalar()).ToString();
}
catch (Exception ex)
{

}

}

Comments or Responses

Login to post response