网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
假定表table1中phone列有空值,则select count(*) from table1与select count(phone) from table1相等吗? ()
- A、相等
- B、不相等
参考答案
更多 “假定表table1中phone列有空值,则select count(*) from table1与select count(phone) from table1相等吗? ()A、相等B、不相等” 相关考题
考题
已知基本表SC(S#,C#,GRADE),则“统计选修了课程的学生人次数”的SQL语句为( )。A.SELECT COUNT(DISTINCTS#)/FROM SCB.SELECT COUNT(S#)/FROM SCC.SELECTCOUNT(*)/FROM SCD.SELECT COUNT (DISTINCT*)/FROM SC
考题
统计每个部门中人数( )A.SELECT SUM(ID) FROM EMP GROUP BY DEPTNO;B.SELECT SUM(ID) FROM EMP ORDER BY DEPTNO;C.SELECT COUNT(ID) FROM EMP ORDER BY DEPTNO;D.SELECT COUNT(ID) FROM EMP GROUP BY DEPTNO;
考题
根据SQL标准,查询表student(sno,sname,sex,dept)中所有学生的选修课程数,其中选修记录在表SC(sno,cno,grade)中,两表中sno为关联字段。下面哪条语句合适?()A select sno,count(cno) from SCB select sno,count(cno) from studentC select a.sno,count(cno) from student a left outer join SCD select a.sno,count(cno) from SC left outer join student a
考题
要从选课表(学号、课程号、成绩)中查询选修了三门课程以上的学生学号,应使用的SELECT-SQL语句是A.SELECT学号FROM选课表WHERE COUNT(*)>=3B.SELECT学号FROM选课表HAVING COUNT(*)>=3C.SELECT学号FROM选课表GROUP BY学号HAVING COUNT(*)>=3D.SELECT学号FROM选课表GROUP BY学号WHERE COUNT(*)>=3
考题
检索最少有5名职工的每个部门的职工基本工资的总额( )。A.SELECT 部门号,COUNT(*),SUM(基本工资) FROM 职工; HAVING COUNT(*)>=5B.SELECT 部门号,COUNT(*),SUM(基本工资) FROM 职工; GROUP BY 基本工资 HAVING COUNT(*)>=5C.SELECT 部门号,COUNT(*),SUM(基本工资) FROM 职工; GROUP BY 部门号 HAVING COUNT(*)>=5D.SELECT 部门号,COUNT(*),SUM(基本工资) FROM 职工; GROUP BY 部门号 WHERE COUNT(*)>=5
考题
这段代码有什么不足之处?try {Connection conn = ...;Statement stmt = ...;ResultSet rs = stmt.executeQuery("select * from table1");while(rs.next()) {}} catch(Exception ex) {}
考题
若需统计“选课”表中已经选修了课程的学生人数,下面语句正确的是( )。A.SELECT COUNT(DISTINCT学生号)FROM选课B.SELECT COUNT(学生号)FROM选课C.SELECT COUNT(*)FROM选课D.SELECT COUNT(DISTINCT*)FROM选课
考题
求至少有两个职工的每个仓库的平均工资______。A.SELECT仓库号,COUNT(*),AVG(工资)FROM职工表; HAVINGCOUNT(*)>=2B.SELECT仓库号,COUNT(*),AVG(工资)FROM职工表; GROUPBY仓库号HAVING COUNT(*)>=2C.SELECT仓库号,COUNT(*),AVG(工资)FROM职工表; GROUPBY仓库号SET COUNT(*)>=2D.SELECT仓库号,COUNT(*),AVG(工资)FROM职工表; GROUPBY仓库号WHERE COUNT(*)>=2
考题
若需统计zg表中车身厂的职工工资总和,下面语句正确的是( )。A.SELECT SUM(基本工资)FROM zgB.SELECT SUM(基本工资)FROM zgWHERE 单位=“车身厂”C.SELECT COUNT(基本工资)FROM zgD.SELECT COUNT(基本工资)FROM zgWHERE单位=“车身厂”
考题
列出EMP表中,从事每个工种(JOB)的员工人数()
A.select job from emp;B.select job,count(*) from emp;C.select distinct job,count(*) from emp;D.select job,count(*) from emp group by job;E.select job,sum(empno) from emp group by job;
考题
设有“职工”表,表结构如下:职工(部门号C(2)、职工号C(4)、姓名C(8)、年龄N(2)、工资N(7,2))检索最少有3名职工的每个部门的职工工资的总额( )。A)SELECT部门号,COUNT(﹡),SUM(工资)FROM职工;HAVING COUNT(﹡)﹥=3B)SELECT部门号,COUNT(﹡),SUM(1资)FROM职工;GROUP BY基本工资HAVING COUNT(﹡)=3C)SELECT部门号,COUNT(﹡),SUM(1资)FROM职工;GROUP BY部门号HAVING COUNT(﹡)=3D)SELECT部门号,COUNT(﹡),SUM(T资)FROM职工;GROUP BY部门号WHERE COUNT(﹡)=3
考题
求至少有两个职工的每个仓库的平均工资A.SELECT 仓库号,COUNT(*),AVG(工资)FROM 职工表;HAVING COUNT(*)=2B.SELECT 仓库号,COUNT(*),AVG(工资)FROM 职工表;GROUP BY 仓库号 HAVING COUNT(*)=2C.SELECT 仓库号,COUNT(*),AVG(工资)FROM 职工表;GROUP BY 仓库号 SET COUNT(*)=2D.SELECT 仓库号,COUNT(*),AVG(工资)FROM 职工表;GROUP BY 仓库号 WHERE COUNT(*)=2
考题
检索最少有4名职工的仓库的职工平均工资( )。A)SELECT仓库号,COUNT(﹡)AS人数,AVG(工资)AS平均工资FROM职工;GROUP BY仓库号WHERE COUNT(﹡)=4B)SELECT仓库号,COUNT(﹡)AS人数,AVG(1资)AS平均工资FROM职工;GROUP BY仓库号HAVING COUNT(﹡)=4C)SELECT仓库号,COUNT(木)AS人数,AVG(工资)AS平均工资FROM职工;GROUP BY职工号WHERE COUNT(﹡)=4D)SELECT仓库号,COUNT(﹡)AS人数,AVG(工资)AS平均工资FROM职工;GROUP BY职工号HAVING COUNT(﹡)=4
考题
查询“学生”表的所有记录并存储于表文件table1中的SQL语句是( )。A)SELECT﹡FROM学生INTOCURSORtable1B)SELECT﹡FROM学生TOCURSORtable1C)SELECT﹡F1的M学生INTODBFtable1D)SELECT﹡FROM学生TOTABLEtable1
考题
在职工.dbf表中,查询所有职工的工资(数值型)的平均值的命令为()A、SELECT 平均工资 FROM 职工B、SELECT AVG(工资) FROM 职工C、SELECT SUM(工资) FROM 职工D、SELECT COUNT(工资) FROM 职工
考题
下列SQL语句中,能够完成求某列最大值的是()。A、SELECT AVG(Age) FROM StudentB、SELECT MAX(Age) FROM StudentC、SELECT MIN(Age) FROM StudentD、SELECT COUNT(*) FROM Student
考题
下列查询语句中,错误的是()。A、SELECT Sno, COUNT(*) FROM SC GROUP BY SnoB、SELECT Sno FROM SC GROUP BY Sno WHERE COUNT(*) 3C、SELECT Sno FROM SC GROUP BY Sno HAVING COUNT(*) 3D、SELECT Sno FROM SC GROUP BY Sno
考题
数据库中有一张表名称为Student,有列Number,Name,Age,IDCard,Sex。主键为Number。统计学生总人数,下列哪个SQL语句是正确的()A、Select Count(1)From StudentB、Select Sum(*)From StudentC、Selec tAvg(*)From StudentD、Select Count(*)From Student
考题
在职工.dbf表中,查询所有职工的工资(数值型)的总和的命令为()A、SELECT 平均工资 FROM 职工B、SELECT AVG(工资) FROM 职工C、SELECT SUM(工资) FROM 职工D、SELECT COUNT(工资) FROM 职工
考题
在职工.dbf表中,查询工资(数值型)大于1000的人数的命令为()A、SELECT 工资1000 FROM 职工B、SELECT SUM(工资) FROM 职工 WHERE 工资1000C、SELECT COUNT(*) FROM 职工 FOR 工资1000D、SELECT COUNT(*) FROM 职工 WHERE 工资1000
考题
假设订单表orders用来存储订单信息,cid代表客户编号,money代表单次订购额,现要查询每个客户的订购次数和每个客户的订购总金额,下面()sql语句可以返回正确结果。A、select cid,count(distinct(cid)),sum(money) from orders group by cidB、select cid,count(distinct(cid)),sum(money) from orders order by cidC、select cid,count(cid),sum(money) from orders order by cidD、select cid,count(cid),sum(money) from orders group by cid
考题
The CUSTOMERS table has these columns: CUSTOMER_ID NUMBER(4) NOT NULL CUSTOMER_NAME VARCHAR2(100) NOT NULL STREET_ADDRESS VARCHAR2(150) CITY_ADDRESS VARCHAR2(50) STATE_ADDRESS VARCHAR2(50) PROVINCE_ADDRESS VARCHAR2(50) COUNTRY_ADDRESS VARCHAR2(50) POSTAL_CODE VARCHAR2(12) CUSTOMER_PHONE VARCHAR2(20) The CUSTOMER_ID column is the primary key for the table. Which two statements find the number of customers? () A、SELECT TOTAL(*) FROM customer;B、SELECT COUNT(*) FROM customer;C、SELECT TOTAL(customer_id) FROM customer;D、SELECT COUNT(customer_id) FROM customer;E、SELECT COUNT(customers) FROM customer;F、SELECT TOTAL(customer_name) FROM customer;
考题
列出EMP表中,从事每个工种(JOB)的员工人数()A、select job from emp;B、select job,count(*) from emp;C、select distinct job,count(*) from emp;D、select job,count(*) from emp group by job;E、select job,sum(empno) from emp group by job;
考题
如果希望从学生表中查询出同学的平均年龄,那么语句中应该包含()。A、SELECT MIN (年龄) AS 平均 FROM 学生表B、SELECT MAX (年龄) AS 平均 FROM 学生表C、SELECT AVG (年龄) AS 平均 FROM 学生表D、SELECT COUNT (年龄) AS 平均 FROM 学生表
考题
单选题假定表table1中phone列有空值,则select count(*) from table1与select count(phone) from table1相等吗? ()A
相等B
不相等
考题
问答题select count(*) from student和select count(id) from student之间的区别是什么?
热门标签
最新试卷