SELECT Count(distinct table_name) 我如何显示或放入标签
SELECT Count(distinct table_name) how can i show or put in label
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=I want it be put in my label。任何人都知道我该怎么做或向我展示我真正需要它的代码。
SELECT Count(distinct os_number) AS label1 FROM order_sub o where isActive=0;
你需要使用ALIAS
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=I want it be put in my label。任何人都知道我该怎么做或向我展示我真正需要它的代码。
SELECT Count(distinct os_number) AS label1 FROM order_sub o where isActive=0;
你需要使用ALIAS