查询应用程序在使用那张表
show OPEN TABLES where In_use > 0;
某列数据有重复的值,查询该重复的值
select cardno from csv group by cardno having count(*) >= 2
一张表放id和姓名 一张表放id和卡号 通过内连接查询卡号和姓名的关系
select dbo.EmployeeCard.EmpId, dbo.EmployeeCard.EcadNo,dbo.Employee.EmpName from dbo.EmployeeCard inner join dbo.Employee on dbo.EmployeeCard.EmpId = dbo.Employee.EmpId;