常用sql语句
作者:互联网
查询应用程序在使用那张表
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;
标签:语句,EmpId,常用,表放,dbo,EmployeeCard,sql,Employee,id 来源: https://www.cnblogs.com/alantop/p/15410520.html