随笔分类 -  C#

C#中通过连接池连接mysql数据库
摘要:使用连接池可以提高C#程序连接MySQL数据库的性能,使得不必每次建立新的物理连接。 using System.Data; using MySql.Data.MySqlClient; namespace ConsoleApp1 { class Program { private const int 阅读全文
posted @ 2023-06-01 08:43 杨-C# 阅读(1720) 评论(0) 推荐(0)
SQL Server 分页查询
摘要:由于数据比较多,需要对数据进行分页展示,数据库用的是SQL Server,具体的分页方式: select * from (selec id,ROW_NUMBER() OVER(Order by insertTime desc ) AS RowId from tempa ) t where RowId 阅读全文
posted @ 2023-02-01 16:39 杨-C#