gpt4 book ai didi

c# - 使用 View 的 MySQL 数据库报告

转载 作者:行者123 更新时间:2023-11-30 01:32:53 26 4
gpt4 key购买 nike

我正在创建一个 View ,该 View 将从不同的表和模式返回一系列行计数,而不是使用 Crystal 报告创建报告...等..\

只关心使用 count(col) 和 where 子句查询许多表。

这种方法的缺点是什么?

我创建的 View 中的一个小片段

SELECT  ccwc.`Status` , COUNT('status') AS 'RowCount'
FROM ccwc
GROUP BY ccwc.status
UNION
SELECT 'WC_Total' ,
COUNT(Id)
FROM `ccwc`
union
select 'WC_Exceeded' ,COUNT(Id) from ccwc where Attempts = 3
union
select 'WC_No_Attempts' ,COUNT(Id) from ccwc where Attempts = 0
union
select 'ccEmp Count' , count(*) from cc_emp_lite

注意:此 View 将由 winforms C# 应用程序用于连接到 MySQL 服务器的大约 100 个客户端

最佳答案

我认为以这种方式查询数据库来构造 View 没有问题。您提到的影响可以忽略不计。

关于c# - 使用 View 的 MySQL 数据库报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17244409/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com