摘要:
在NuGet程序包中安装MySql.Data 引入命名空间 using MySql.Data.MySqlClient; using System.Configuration; 在App.config中配置(方便更改连接) <connectionStrings> <add name ="connStr 阅读全文
摘要:
左关联(只要主表有的数据都会展示出来) select * from tb_user u(主表) left join tb_class c (从表)on u.id=c.id; 通过id把两个表id相同的数据连接起来 中关联(后表没有的数据不会展示出来) select * from tb_user u 阅读全文
摘要:
select * from 表名; 查询该表下所有数据 select * from 表名 where 条件; 查询满足某条件的数据 select * from tb_user where id>2; 模糊查询 like (_(占位符)、%(通配符)) select * from tb_user wh 阅读全文