SELECT Count(distinct table_name)如何显示或放入标签

时间:2015-03-29 07:13:52

标签: mysql visual-studio-2010 visual-studio visual-studio-2012

SELECT Count(distinct os_number) FROM order_sub o where  isActive=0;

----------


Call Connects()
        MySqlCmd = New MySqlCommand
        MySqlCmd.Connection = Myconnect
        MySqlCmd.CommandText = "SELECT Count(distinct os_number) FROM order_sub o where  isActive=0"
        MyDA = New MySqlDataAdapter
        myDataTable = New DataTable


----------

我的问题是我不知道怎么能把我的查询结果。此查询显示15个值i =我希望将其放入我的标签中。任何人都知道我该怎么做或向我展示我真正需要的代码。

1 个答案:

答案 0 :(得分:1)

SELECT Count(distinct os_number) AS label1 FROM order_sub o where  isActive=0;

您需要使用ALIAS