几个简单常用的Sql语句
select SUM(Gnumber) as Ids from Goods where Cids = '2'; --查Cids为2的Gnumber列的和,列名为Ids select Cids,Plevel from People; select * from Salary; select * from Salary,People where People.Plevel = Salary.Slevel; --查Salary,People两个表 select SUM(Ssalary) as salary from Salary,People where People.Plevel = Salary.Slevel and Cids = '2'; --合并Salary,People,查Cids为2的Ssalary列的和,列名为salary