网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

现有表Employee,字段:id(int)、firstname(varchar)、lastname(varchar);以下sql语句错误的是()

  • A、select firstname+’.’+lastnameas’name’from employee
  • B、select firstname+’.’+lastname=’name’from employee
  • C、select’name’=firstname+’.’+lastnamefrom employee
  • D、select firstname,lastname from employee

参考答案

更多 “现有表Employee,字段:id(int)、firstname(varchar)、lastname(varchar);以下sql语句错误的是()A、select firstname+’.’+lastnameas’name’from employeeB、select firstname+’.’+lastname=’name’from employeeC、select’name’=firstname+’.’+lastnamefrom employeeD、select firstname,lastname from employee” 相关考题
考题 回答下列各题: 创建数据库“Accl.mdb”,利用表向导创建“录影集”表,选择其中的“录音集ID”、“演员ID”、“导演ID”、“出版年份”和“长度”字段,设置“录音集ID”字段为主键。

考题 回答下列各题: {TS}创建数据库“Accl.mdb”,利用表向导创建“录影集”表,选择其中的“录音集ID”、“演员ID”、“导演ID”、“出版年份”和“长度”字段,设置“录音集ID”字段为主键。

考题 Examine the data of the EMPLOYEES table.EMPLOYEES (EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID)Which statement lists the ID, name, and salary of the employee, and the ID and name of the employee‘s manager, for all the employees who have a manager and earn more than 4000?()A.B.C.D.E.

考题 描述表1 student 学生信息表ID int 学生编号Name varchar 学生姓名Sex bit 性别(男0女1)Class int 班级编号表2 schedule 课程信息表ID int 课程编号Name varchar 课程名称表3 Grade 成绩信息表ID int 自动编号UID int 学生编号SID int 课程编号Num int 考试成绩(a)求各班的总人数(1分)(b)求1班女生和男生的平均成绩(2分)(c)各班"数据结构"(课程名称)不及格的人数(2分)

考题 现有两张数据表(MySQL数据库)如下:x_pt_info x_user_info字段 类型 长度 小数位 字段 类型 长度 小数位user_id int 11 user_id int 11pt_group int 11 user_name varchar 20pt_number decimal 10 2 user_work int 1描述一下这个SQL语句的作用:SELECT b.user_id as user_id,b.user_name as user_name,round(sum(a.pt_number),2) as ptnum from x_pt_info a,x_user_info b wherea.user_id=b.user_id and a.pt_group=1 and b.user_work=2 group by a.user_id order by ptnum desc另外,就你的经验,你觉得该语句是否有改进的余地,如有,请阐述。

考题 有一个名为sampl.mdb数据库。修改职工表“employee”,增加“姓名”字段。其数据类型为文本型,长度为6,并对应职工号添加其姓名,见下表:(2)判断并设置表“employee”的主键,同时将上面增加的“姓名”字段隐藏起来。(3)设置表“employee”的“基本工资”字段的默认值为:1000。(4)在当前数据库中,对表“employee”做一个备份,命名为表“tEmp”。(5)设置表“employee”的有效性规则为:“津贴”字段的值必须小于等于“基本工资”字段值。(6)将已有的“水费.xls”文件导入到sampl.mdb数据库中,将导入的表命名为“水费记录”。“水费记录”表结构如下表所示。

考题 Given the following function:CREATE FUNCTION emplist () RETURNS TABLE ( id CHAR(6) , firstname VARCHAR(12) , lastname VARCHAR(15) ) LANGUAGE SQL BEGIN ATOMIC RETURN SELECT EMPNO, FIRSTNME, LASTNAME FROM EMPLOYEE WHERE WORKDEPT IN (‘A00‘, ‘B00‘); ENDHow can this function be used in an SQL statement?A.SELECT TABLE(EMPLIST()) FROM EMPLOYEEB.SELECT TABLE(EMPLIST()) AS t FROM EMPLOYEEC.SELECT EMPLIST(id, firstname, lastname) FROM EMPLOYEED.SELECT id, firstname, lastname FROM TABLE(EMPLIST()) AS t

考题 某企业的数据库系统中有如下所示的员工关系和仓库关系,每个仓库可有多名员工,但只有一名负责人。员工关系(employee):仓库关系(warehouse):则创建仓库表结构的SQL语句为(58)。A.CREATE TABLE (employee ID CHAR(2)NOTNULL UNIQUE, name CHAR(30)NOT NULL, address CHAR(40), principal ID CHAR(3));B.CREATE warehouse(warehouse ID CHAR(2)PRIMARY KEY, name CHAR(30), address CHAR(40), principal ID CHAR(3));C.CREATE TABLE warehouse(warehouse ID CHAR(2)PRIMARY KEY, name CHAR(30)NOT NULL, address CHAR(40), principal ID CHAR(3), FOREIGN KEY(principal ID)REFERENCES employee(employee ID));D.CREATE TABIE warehouse(warehouse ID CHAR(2), name CHAR(30)NOT NULL, address CHAR(40), principal ID CHAR(3), PRIMARY REY(warehouse ID), FOREIGN KEY(employee ID)REFERENCES employee(employee ID));

考题 Click the Exhibit button to examine the data of the EMPLOYEES table. Evaluate this SQL statement:SELECT e.employee_id Emp_id, e.emp_name Employee, e.salary, m.employee_id Mgr_id, m.emp_name ManagerFROM employees e JOIN employees m ON (e.mgr_id = m.employee_id)AND e.salary 4000;What is its output?()A.AB.BC.CD.DE.E

考题 Click the Exhibit button to examine the data of the EMPLOYEES table.Which statement lists the ID, name, and salary of the employee, and the ID and name of the employee‘s manager, for all the employees who have a manager and earn more than 4000?()A.SELECT employee_id Emp_id, emp_name Employee, salary, employee_id Mgr_id, emp_name Manager FROM employees WHERE salary 4000;B.SELECT e.employee_id Emp_id, e.emp_name Employee, e.salary, m.employee_id Mgr_id, m.emp_name Manager FROM employees e JOIN employees m WHERE e.mgr_id = m.mgr_id AND e.salary 4000;C.SELECT e.employee_id Emp_id, e.emp_name Employee, e.salary, m.employee_id Mgr_id, m.emp_name Manager FROM employees e JOIN employees m ON (e.mgr_id = m.employee_id) AND e.salary 4000;D.SELECT e.employee_id Emp_id, e.emp_name Employee, e.salary, m.mgr_id Mgr_id, m.emp_name Manager FROM employees e SELF JOIN employees m WHERE e.mgr_id = m.employee_id AND e.salary 4000;E.SELECT e.employee_id Emp_id, e.emp_name Employee, e.salary, m.mgr_id Mgr_id m.emp_name Manager FROM employees e JOIN employees m USING (e.employee_id = m.employee_id) AND e.salary 4000;

考题 由以下语句创建的表有种子字段,请正确组合插入语句,可不分先后。CREATE TABLE Customer(id int IDENTITY PRIMARY KEY,Customer varchar(40))() A.INSERT INTO CustomerB.SET IDENTITY_INSERT Customer ONC.VALUES(3,’garden shovel’)D.(id,Customer)

考题 在数据透视表中自定义计算字段是通过对()执行运算得到自定义字段的。A、数据透视表中的现有字段B、数据清单中的现有字段C、数据透视表中的现有字段项D、数据清单中的现有字段项

考题 为表TEST中ID列添加主键约束的语法是()A、ALTER  TABLE  TEST  CHANGE( ID  INT  PRIMARY  KEY)B、ALTER  TABLE  TEST  ADD( ID  INT  PRIMARY  KEY)C、ALTER  TABLE  TEST  MODIFY( ID  INT  PRIMARY  KEY)D、ALTER  TABLE  TEST  ADD  CONSTRAINT PK  PRIMARY KEY (ID)

考题 现有表book,字段:id(int),title(varchar),price(float);其中id字段设为标识,使用insert语句向book表中插入数据,以下语句错误的是()。A、insert into book (id,title,price) values(1,'java',100)B、insert into book (title,price) values('java',100)C、insert into book values ('java',100) 这辆都不可以啊,如果不指定列需要明确的给出空值D、insert book values('java',100)

考题 评估以下语句: ALTER TABLE employees ADD CONSTRAINT employee_id PRIMARY KEY; 该语句将返回以下哪种结果()A、将返回语法错误B、将向EMPLOYEES表添加约束条件C、将改写EMPLOYEES表的一个现有约束条件D、将启用EMPLOYEES表的一个现有约束条件

考题 Given the following function: CREATE FUNCTION emplist ( ) RETURNS TABLE ( id CHAR(6) , firstname VARCHAR(12) , lastname VARCHAR(15) ) LANGUAGE SQL BEGIN ATOMIC RETURN SELECT EMPNO, FIRSTNME, LASTNAME FROM EMPLOYEE WHERE WORKDEPT IN ('A00', 'B00'); END How can this function be used in an SQL statement?A、SELECT TABLE(EMPLIST()) FROM EMPLOYEEB、SELECT TABLE(EMPLIST()) AS t FROM EMPLOYEEC、SELECT EMPLIST(id, firstname, lastname) FROM EMPLOYEED、SELECT id, firstname, lastname FROM TABLE(EMPLIST()) AS t

考题 Examine the structure of the EMPLOYEES and NEW_EMPLOYEES tables: EMPLOYEES EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) HIRE_DATE DATE NEW_EMPLOYEES EMPLOYEE_ID NUMBER Primary Key NAME VARCHAR2 (60) Which DELETE statement is valid?()A、DELETE FROM employees WHERE employee_id = (SELECT employee_id FROM employees);B、DELETE * FROM employees WHERE employee_id = (SELECT employee_id FROM new_ employees);C、DELETE FROM employees WHERE employee_id IN (SELECT employee_id FROM new_employees WHERE name = 'carrey');D、DELETE * FROM employees WHERE employee_id IN (SELECT employee_id FROM new_employees WHERE name = 'carrey');

考题 Examine the data of the EMPLOYEES table. EMPLOYEES (EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID) EMP_NAME DEPT_ID MGR_ID JOB_ID SALARY EMPLOYEE_ID 101 Smith 20 120 SA_REP 4000 102 Martin 10 105 CLERK 2500 103 Chris 20 120 IT_ADMIN 4200 104 John 30 108 HR_CLERK 2500 105 Diana 30 108 HR_MGR 5000 106 Bryan 40 110 AD_ASST 3000 108 Jennifer 30 110 HR_DIR 6500 110 Bob 40 EX_DIR 8000 120 Ravi 20 110 SA_DIR 6500 Which statement lists the ID, name, and salary of the employee, and the ID and name of the employee's manager, for all the employees who have a manager and earn more than 4000?()A、SELECT employee_id "Emp_id", emp_name "Employee", salary, employee_id "Mgr_id", emp_name "Manager" FROM employees WHERE salary 4000;B、SELECT e.employee_id "Emp_id", e.emp_name "Employee",C、salary,D、employee_id "Mgr_id", m.emp_name "Manager" FROM employees e, employees m WHERE e.mgr_id = m.mgr_id AND e.salary 4000;

考题 单选题您在公司的数据库中成功创建了名为SALARY的表。您现在要通过向引用EMPLOYEES表的匹配列的SALARY表添加FOREIGNKEY约束条件来建立EMPLOYEES表与SALARY表之间的父/子关系。尚未向SALARY表添加任何数据。应执行以下哪条语句()A ALTER TABLE salary ADD CONSTRAINT fk_employee_id_01 FOREIGN KEY(employee_id)REFERENCES employees(employee_id)B ALTER TABLE salary ADD CONSTRAINT fk_employee_id_ FOREIGN KEY BETWEEN salary(employee_id)AND employees(employee_id)C ALTER TABLE salary FOREIGN KEY CONSTRAINT fk_employee_id_REFERENCES employees(employee_id)D ALTER TABLE salary ADD CONSTRAINT fk_employee_id_FOREIGN KEY salary(employee_id)=employees(employee_id)

考题 单选题现有表book,字段:id(int),title(varchar),price(float);其中id字段设为标识,使用insert语句向book表中插入数据,以下语句错误的是()。A insert into book(id,title,price)values(1,’java’,100)B insert into book(title,price)values(’java’,100)C insert into book values(’java’,100)D insert book values(’java’,100)

考题 单选题下列选项中,能实现对父类的getSalary方法重写的是(  )。 class Employee{ public double getSalary(){} }A class Manager extends Employee{ public int getSalary(double x){} }B class Manager extends Employee{ public double getSalary(int x,int y){} }C class Manager extends Employee{ public double getSalary(){} }D class Manager extends Employee{ public int getSalary(int x,int y){} }

考题 多选题由以下语句创建的表有种子字段,请正确组合插入语句,可不分先后。CREATE TABLE Customer(id int IDENTITY PRIMARY KEY,Customer varchar(40))()AINSERT INTO CustomerBSET IDENTITY_INSERT Customer ONCVALUES(3,’garden shovel’)D(id,Customer)

考题 单选题DEPARTMENT 表包含以下列: DEPT_ID NUMBER, Primary Key DEPT_ABBR VARCHAR2(4) DEPT_NAME VARCHAR2(30) MGR_ID NUMBER EMPLOYEE 表包含以下列: EMPLOYEE_ID NUMBER EMP_LNAME VARCHAR2(25) EMP_FNAME VARCHAR2(25) DEPT_ID NUMBER JOB_ID NUMBER MGR_ID NUMBER SALARY NUMBER(9,2) HIRE_DATE DATE 请评估以下语句: ALTER TABLE employee ADD CONSTRAINT REFERENTIAL (mgr_id) TO department(mgr_id); 是以下哪个说法()A ALTER TABLE语句创建从EMPLOYEE表到DEPARTMENT表的引用约束条件B ALTER TABLE语句创建从DEPARTMENT表到EMPLOYEE表的引用约束条件C ADD CONSTRAINT子句存在语法错误,因此ALTER TABLE语句将会失败D ALTER TABLE语句执行成功,但不重新创建引用约束条件

考题 单选题Examine the structure of the EMPLOYEES and NEW_EMPLOYEES tables: EMPLOYEES EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2 (25) LAST_NAME VARCHAR2 (25) HIRE_DATE DATE NEW EMPLOYEES EMPLOYEE_ID NUMBER Primary Key NAME VARCHAR2 (60) Which DELETE statement is valid? ()A DELETE FROM employees WHERE employee_id = (SELECT employee_id FROM employees);B DELETE * FROM employees WHERE employee_id = (SELECT employee_id FROM new_ employees);C DELETE FROM employees WHERE employee_id IN (SELECT employee_id FROM new_employees WHERE name = ('Carrey')'D DELETE * FROM employees WHERE employee_id IN (SELECT employee_id FROM new_employees WHERE last_ name = ('Carrey')'

考题 单选题现有表book,字段:id(int),title(varchar),price(float);其中id字段设为自增长的标识,使用insert语句向book表中插入数据,以下语句错误的是()。A insertintobook(id,title,price)values(1,’java’,100)B insertintobook(title,price)values(’java’,100)C insertintobookvalues(’java’,100)D insertbookvalues(’java’,100)

考题 单选题评估EMPLOYEE表的结构: EMPLOYEE_IDNUMBER(9) LAST_NAMEVARCHAR2(25) FIRST_NAMEVARCHAR2(25) DEPARTMENT_IDNUMBER(9) MANAGER_IDNUMBER(9) SALARYNUMBER(7,2) EMPLOYEE_ID列当前包含500个雇员标识号。业务需求已发生变化,您需要允许用户在标识值中包含文本字符。应该使用哪条语句来更改该列的数据类型()A ALTER TABLE employee MODIFY(employee_id VARCHAR2(9))B ALTER TABLE employee REPLACE(employee_id VARCHAR2(9))C ALTER employee TABLEMODIFY COLUMN(employee_id VARCHAR2(15))D 您不能修改EMPLOYEE_ID列的数据类型,因为该表不为空

考题 单选题Examine the data of the EMPLOYEES table. EMPLOYEES (EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID) EMP_NAME DEPT_ID MGR_ID JOB_ID SALARY EMPLOYEE_ID 101 Smith 20 120 SA_REP 4000 102 Martin 10 105 CLERK 2500 103 Chris 20 120 IT_ADMIN 4200 104 John 30 108 HR_CLERK 2500 105 Diana 30 108 HR_MGR 5000 106 Bryan 40 110 AD_ASST 3000 108 Jennifer 30 110 HR_DIR 6500 110 Bob 40 EX_DIR 8000 120 Ravi 20 110 SA_DIR 6500 Which statement lists the ID, name, and salary of the employee, and the ID and name of the employee's manager, for all the employees who have a manager and earn more than 4000?()A SELECT employee_id Emp_id, emp_name Employee, salary, employee_id Mgr_id, emp_name Manager FROM employees WHERE salary 4000;B SELECT e.employee_id Emp_id, e.emp_name Employee,C salary,D employee_id Mgr_id, m.emp_name Manager FROM employees e, employees m WHERE e.mgr_id = m.mgr_id AND e.salary 4000;