单选题您在公司的数据库中成功创建了名为SALARY的表。您现在要通过向引用EMPLOYEES表的匹配列的SALARY表添加FOREIGNKEY约束条件来建立EMPLOYEES表与SALARY表之间的父/子关系。尚未向SALARY表添加任何数据。应执行以下哪条语句()AALTER TABLE salary ADD CONSTRAINT fk_employee_id_01 FOREIGN KEY(employee_id)REFERENCES employees(employee_id)BALTER TABLE salary ADD CONSTRAINT fk_employee_id_ FOREIGN KEY BETWEEN salary(employee_id)AND employees(employee_id)CALTER TABLE salary FOREIGN KEY CONSTRAINT fk_employee_id_REFERENCES employees(employee_id)DALTER TABLE salary ADD CONSTRAINT fk_employee_id_FOREIGN KEY salary(employee_id)=employees(employee_id)
单选题
您在公司的数据库中成功创建了名为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)
参考解析
解析:
暂无解析
相关考题:
如果对关系emp(eno,ename,salary)成功执行下面的SQL语句: CREATE CLUSTER INDEX name_index ON emp(salary) 对此结果的正确描述是A.在emp表上按salary升序创建了一个聚簇索引B.在emp表上按salary降序创建了一个聚簇索引C.在emp表上按salary升序创建了一个唯一索引D.在emp表上按salary降序创建了一个唯一索引
( 30 )如果对关系 emp ( eno , ename , salray )成功执行下面的 SQL 语句:CREATE CLUSTER INDEX name_index ON emp ( salary )对此结果的正确描述是A) 在 emp 表上按 salary 升序创建了一个唯一索引B) 在 emp 表上按 salary 降序创建了一个唯一索引C) 在 emp 表上按 salary 升序创建了一个聚簇索引D) 在 emp 表上按 salary 降序创建了一个聚簇索引
如果对关系emp(eno,ename,salary)成功执行下面的SQ[.语句:CREATE CLUSTER INDEX name_index 0N emp(salary)对此结果的正确描述是A.在emp表上按salary升序创建了一个唯一索引B.在emp表上按salary降序创建了一个唯一索引C.在emp表上按salary升序创建了一个聚簇索引D.在emp表上按salary降序创建了一个聚簇索引
Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary KeyFIRST_NAME VARCHAR2(25)LAST_NAME VARCHAR2(25)DEPARTMENT_ID NUMBERSALARY NUMBERWhat is the correct syntax for an inline view? ()A. SELECT a.last_name, a.salary, a.department_id, b.maxsal FROM employees a, (SELECT department_id, max(salary)maxsal FROM employees GROUP BY department_id) b WHERE a.department_id = b.department_id AND a.salary b.maxsal;B. SELECT a.last name, a.salary, a.department_id FROM employees a WHERE a.department_id IN (SELECT department_id FROM employees b GROUP BY department_id having salary = (SELECT max(salary) from employees))C. SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE a.salary = (SELECT max(salary) FROM employees b WHERE a.department _ id = b.department _ id);D. SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE (a.department_id, a.salary) IN (SELECT department_id, a.salary) IN (SELECT department_id max(salary) FROM employees b GROUP BY department_id ORDER BY department _ id);
Examine the data in the EMPLOYEES table:Which three subqueries work? () A. SELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department _ id);B. SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);C. SELECT distinct department_id FROM employees Where salary ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);D. SELECT department_id FROM employees WHERE SALARY ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);E. SELECT last_name FROM employees Where salary ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);F. SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));
Examine the data in the EMPLOYEES table:LAST_NAME DEPARTMENT_ID SALARYGetz 10 3000Davis 20 1500Bill 20 2200Davis 30 5000...Which three subqueries work? () A. SELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department _ id);B. SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);C. SELECT distinct department_id FROM employees Where salary ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);D. SELECT department_id FROM employees WHERE SALARY ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);E. SELECT last_name FROM employees Where salary ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);F. SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));
Click the Exhibit button and examine the data in the EMPLOYEES table.Which three subqueries work? () A.SELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department_id);B.SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id);C.SELECT distinct department_id FROM employees WHERE salary ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);D.SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY department_id);E.SELECT last_name FROM employees WHERE salary ANY (SELECT MAX(salary) FROM employees GROUP BY department_id);F.SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));
如果对关系S(number,name,score)成功执行下列SQL语句: CREATE CLUSTER INDEX name_index ON S(score) 对此结果的正确描述是( )。A.在S表上按salary升序创建了一个唯一索引B.在S表上按salary降序创建了一个唯一索引C.在S表上按salary升序创建了一个聚簇索引D.在S表上按salary降序创建了一个聚簇索引
如果对关系S(number, name, score)成功执行下列SQL语句:CREATE CLUSTER INDEX name_ index ON S(score)对此结果的描述中,正确的是( )。A.在S表上按salary升序创建了一个唯一索引B.在S表上按salary降序创建了一个唯一索引C.在S表上按salary升序创建了一个聚簇索引D.在S表上按salary降序创建了一个聚簇索引
建立“student.mdb”数据库,利用表向导生成“学生”表,选择学生ID、名字、地址和主修字段。(2)添加以下信息到“学生”表中,行高设置为13。(3)隐藏“学生”表的学生ID列,设置所有字段列列宽为最佳匹配。“学生”表如图所示。
(33)如果对关系 emp(eno, ename, salary)成功执行下面的SQL语句:CREATE CLUSTER INDEX name_index ON emp(salary)其结果是A)在 emp表上按sal娜升序创建了一个聚簇索引B)在 emp表上按salary降序创建了一个聚簇索引C)在 emp表上按salary升序创建了一个唯一索引D)在 emp表上按salary降序创建了一个唯一索引
你是一个真空吸尘器销售公司的数据库开发者。公司已有一个名为Sales的数据库,包含有VacuumSales表和Employee表。销售信息存储在VacuumSales表中,雇员信息存储在employee表中,在Employee表中有一位列名为IsActive.这个列表明是否有雇员被当前雇用。Employee表也有一个列为EmployeeID是毎个雇员的唯一标示符。所有的销售输入到VacuumSales表必须包含当前被雇用的雇员的employeeID。你应该如何来实现这个要求?()A、用微软分布式事务处理Employee表在分布式处理中如果EmployeeID没有执行则将回滚整个事务。B、在VacuumSales表的EmployeeID列中添加一个CHECK约束。C、在VacuumSales表的EmployeeID列中添加一个外键约束参照Employee表中的EmployeeID列。D、在VacuumSales表中添加一个FORINSERT触发器。在触发器中,在inserted表的基础上连接Employee表和EmployeeID表,测试IsActive列。
你是公司会计数据库的开发者。数据库包含一个名叫Employees的表。Tom是会计部门的一个成员。Tom的数据库用户帐户对表Employees里的列Salary和Bonus Percentage的SELECT权限被拒绝,被授予对其他列的SELECT权限。Tom现在要求访问Employees表里的所有数据。你该怎么做?()A、废除Tom数据库用户帐户对表Employees里的列Salary和Bonus Percentage的SELECT权限B、添加Tom到db_datareader角色C、添加Tom到db_accessadmin角色D、授予Tom数据库用户帐户对表Employees里的列Salary和Bonus Percentage的SELECT权限。
以下SQL命令执行什么操作() ALTER TABLE employees ADD CONSTRAINT emp_manager_fk FOREIGN KEY(manager_id) REFERENCES employees(employee_id).A、更改employees表并禁用emp_manager_fk约束条件B、向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理必须已是雇员C、向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理标识应匹配每个雇员标识D、更改employees表并添加FOREIGN KEY约束,要求每个雇员标识必须唯一
您在“雇员”表的一个子集上创建了名为EMPLOYEES_VIEW的视图。用户AUDREY需要使用此视图创建报表。只有您和Audrey具有此视图的访问权限。应执行下列哪项操作()A、不执行任何操作。Audrey做为数据库用户,他的用户帐户已自动被授予对所有数据库对象的SELECT权限B、GRANT SELECT ON employees_viewTO publicC、GRANT SELECT ON employees_viewTO audreyD、GRANT SELECT ON employees AND employees_view TO audrey
现有表user,字段:userid,username,salary,deptid,email;表department,字段:deptid,deptname;下面()应采用检查约束来实现。A、若department中不存在deptid为2的纪录,则不允许在user表中插入deptid为2的数据行。B、若user表中已经存在userid为10的记录,则不允许在user表中再次插入userid为10的数据行。C、User表中的salary(薪水)值必须在1000元以上。D、若User表的email列允许为空,则向user表中插入数据时,可以不输入email值。
Examine the data in the EMPLOYEES table: LAST_NAME DEPARTMENT_ID SALARY Getz 10 3000 Davis 20 1500 Bill 20 2200 Davis 30 5000 ... Which three subqueries work? ()A、SELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department _ id);B、SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);C、SELECT distinct department_id FROM employees Where salary ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);D、SELECT department_id FROM employees WHERE SALARY ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);E、SELECT last_name FROM employees Where salary ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);F、SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));
问答题在考生文件夹下完成如下操作: (1)打开项目文件salary_p,将考生文件夹下的数据库salary_rib添加到该项目中。 (2)在salary_db数据库中为dept表创建一个主索引(升序),索引名和索引表达式均是“部门号”;为 salarys表创建一个普通索引(升序),索引名和索引表达式均是“部门号”,再创建一个主索引(升序),索引名和索引表达式均是“雇员号”。 (3)通过“部门号”字段建立salarys表和dept表间的永久联系。 (4)为以上建立的联系设置参照完整性约束:更新规则为“限制”,删除规则为“级联”,插入规则为“限制”。
单选题Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_ NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHAR2(30) SALARY NUMBER(8,2) Which statement shows the department ID, minimum salary, and maximum salary paid in that department, only if the minimum salary is less than 5000 and maximum salary is more than 15000?()ASELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) 5000 AND MAX(salary) 15000;BSELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) 5000 AND MAX(salary) 15000 GROUP BY dept_id;CSELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) 5000 AND MAX(salary) 15000;DSELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN(salary) 5000 AND MAX(salary) 15000;ESELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN(salary) 5000 AND MAX(salary) 15000;
多选题Examine the data in the EMPLOYEES table: Which three subqueries work? ()ASELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department _ id);BSELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);CSELECT distinct department_id FROM employees Where salary ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);DSELECT department_id FROM employees WHERE SALARY ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);ESELECT last_name FROM employees Where salary ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);FSELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));
单选题现有表user,字段:userid,username,salary,deptid,email;表department,字段:deptid,deptname;下面()应采用检查约束来实现。A若department中不存在deptid为2的纪录,则不允许在user表中插入deptid为2的数据行。B若user表中已经存在userid为10的记录,则不允许在user表中再次插入userid为10的数据行。CUser表中的salary(薪水)值必须在1000元以上。D若User表的email列允许为空,则向user表中插入数据时,可以不输入email值。
单选题设当前数据表文件有数值型字段salary,则命令.REPLACEsalaryWITH1500的功能是()。A将数据表中所有记录的salary字段的值都改为1500B只将数据表中当前记录的salary字段的值改为1500C由于没有指定条件,所以不能确定D将数据表中以前未更改过的salary字段的值改为1500
单选题如果对关系emp(eno,ename,salary)成功执行下面的SQL语句:CREATECLUSTERINDEXname_indexONemp(salary),其结果是()A在emp表上按salary升序创建了一个聚簇索引B在emp表上按salary降序创建了一个聚簇索引C在emp表上按salary升序创建了一个唯一索引D在emp表上按salary降序创建了一个唯一索引
单选题Which SQL statement generates the alias Annual Salary for the calculated column SALARY*12?()ASELECT ename, salary*12 ‘Annual Salary’ FROM employees;BSELECT ename, salary*12 “Annual Salary” FROM employees;CSELECT ename, salary*12 AS Annual Salary FROM employees;DSELECT ename, salary*12 AS INITCAP(“ANNUAL SALARY”) FROM employees
单选题评估此CREATE VIEW语句: CREATE VIEW emp_view AS SELECT SUM(salary) FROM employees; 以下哪个说法是的()A使用“雇员视图”视图不能更新“雇员”表中的数据B使用“雇员视图”视图可以更新“雇员”表中的任何数据C使用“雇员视图”视图不能删除“雇员”表中的记录D使用“雇员视图”视图仅能更新“雇员”表中的“薪金”列
单选题你是公司会计数据库的开发者。数据库包含一个名叫Employees的表。Tom是会计部门的一个成员。Tom的数据库用户帐户对表Employees里的列Salary和Bonus Percentage的SELECT权限被拒绝,被授予对其他列的SELECT权限。Tom现在要求访问Employees表里的所有数据。你该怎么做?()A废除Tom数据库用户帐户对表Employees里的列Salary和Bonus Percentage的SELECT权限B添加Tom到db_datareader角色C添加Tom到db_accessadmin角色D授予Tom数据库用户帐户对表Employees里的列Salary和Bonus Percentage的SELECT权限。
单选题以下SQL命令执行什么操作() ALTER TABLE employees ADD CONSTRAINT emp_manager_fk FOREIGN KEY(manager_id) REFERENCES employees(employee_id).A更改employees表并禁用emp_manager_fk约束条件B向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理必须已是雇员C向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理标识应匹配每个雇员标识D更改employees表并添加FOREIGN KEY约束,要求每个雇员标识必须唯一