单选题现有表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值。
单选题
现有表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值。
参考解析
解析:
暂无解析
相关考题:
在考生文件夹下的“职员管理”数据库中完成下列基本操作:(1)为“员工信息”表增加一个字段,字段名为“EMAIL”,类型为“字符型”,宽度为“20”。(2)设置“员工信息”表中“性别”字段的有效性规则,性别取“男”或“女”,默认值为“女”。(3)在“员工信息”表中,将所有记录的“EMAIL”字段值用“部门编号”的字段值加上“职工编号”的字段值再加上“@XXX.tom.cn”进行替换。(4)通过“部门编号”字段建立“员工信息”表和“部门”表间的永久联系。
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));
在Visual FoxPor中,使用SQL语言的ALTER TABLE命令给学生表STUDENT增加一个Email字段,长度为30,命令是(关键字必须拼写完整)。ALTER TABLE STUDENT ____ Email C (30)
假设有数据库 address,内有表 link,该表中包含字段:姓名(name varchar(50)),电话(telvarchar(20)),email(email varchar(50)),请分页将 link 表中的数据显示出来,且每页显示记录8条。
From the DX WebUI Dashboard, which steps are used for creating a new admin user? () A. Click Admin Users. Enter username, password, role, account status, and email.B. Click Admin Users. Enter username, password, role, account status, and user class.C. Click Users Manage Users. Enter username, password, role, account status, and user class.D. Click Users Manage Users. Enter username, password, ActiveDirectory domain, account status, and role.
要在users表中插入1条记录,下面哪条语句是正确的() A.InsertIntousers(id,user_namE.Valuee(100,luhong)提示:id字段类型自动编号,因此,用户不能赋值B.InsertIntousers(real_name,tel)Valuee(卢红,6545632)提示:user_name是主键必须赋值,但未赋值。C.InsertIntousers(user_name,Email)Valuee(luhong,)提示:Email不是必填字段,但应该赋NULL值D.InsertIntousers(user_name,Email)Valuee(luhong,NULL)
有一用户表,表中字段为:用户ID(userid(int))、用户名(username(varchar))、用户密码(password(varchar)),该表需要设置主键,以下说法正确的是()A、如果不能有同时重复的username和password,那么username和password可以组合在一起作为主键。B、此表设计主键时,根据选择主键的最小性原则,最好采用userid作为主键。C、此表设计主键时,根据选择主键的最小性原则,最好采用username和password作为组合键。D、如果采用userid作为主键,那么在userid列输入的数值,允许为空。
现有表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值。
假定有一个用户表,表中包含字段:userid(int)、username(varchar)、password(varchar)、等,该表需要设置主键,以下说法正确的是()。A、如果不能有同时重复的username和password,那么username和password可以组合在一起作为主键。B、此表设计主键时,根据选择主键的最小性原则,最好采用userid作为主键。C、此表设计主键时,根据选择主键的最小性原则,最好采用username和password作为组合键。D、如果采用userid作为主键,那么在userid列输入的数值,允许为空。
SELECT*FROMLOGIN_TABLEWHERE USERNAME=‘SUPERADM’的含义是:()。A、显示表LOGIN_TABLE的所有USERNAME等于SUPERADM的所有记录的所有字段的信息B、显示表USERNAME的所有LOGIN_TABLE等于SUPERADM的所有记录的所有字段的信息C、显示表LOGIN_TABLE的所有记录的所有字段的信息D、显示表LOGIN_TABLE的所有USERNAME等于SUPERADM的所有记录的字段USERNAME的信息
在Access数据库窗口使用表设计器创建表的步骤依次是()A、打开表设计器、定义字段、设定主关键字、设定字段属性和表的存储B、打开表设计器、设定主关键字、定义字段、设定字段属性和表的存储C、打开表设计器、定义字段、设定字段的属性、表的存储和设定主关键字D、打开表设计器、设定字段的属性、表的存储、定义字段和设定主关键字
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));
多选题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));
单选题假定有一个用户表,表中包含字段:UserId(int)、UserName(varchar)、PassWord(varchar)等,该表需要设置主键,以下说法最恰当的是()。A此表设计主键时,根据选择主键的最少性原则,最好采用UserId和PassWord作为组合主键。B此表设计主键时,根据选择主键的最少性原则,最好采用UserId作为主键。C此表设计主键时,根据选择主键的最少性原则,最好采用UserName和PassWord作为组合主键。D如果采用UserId作为主键,那么在UserId列输入的数值,允许为空。
单选题设当前数据表文件有数值型字段salary,则命令.REPLACEsalaryWITH1500的功能是()。A将数据表中所有记录的salary字段的值都改为1500B只将数据表中当前记录的salary字段的值改为1500C由于没有指定条件,所以不能确定D将数据表中以前未更改过的salary字段的值改为1500
单选题要在users表中插入1条记录,下面哪条语句是正确的()AInsertIntousers(id,user_namE.Valuee(100,luhong)提示:id字段类型自动编号,因此,用户不能赋值BInsertIntousers(real_name,tel)Valuee(卢红,6545632)提示:user_name是主键必须赋值,但未赋值。CInsertIntousers(user_name,Email)Valuee(luhong,)提示:Email不是必填字段,但应该赋NULL值DInsertIntousers(user_name,Email)Valuee(luhong,NULL)
单选题From the DX WebUI Dashboard, which steps are used for creating a new admin user? ()AClick Admin Users. Enter username, password, role, account status, and email.BClick Admin Users. Enter username, password, role, account status, and user class.CClick Users Manage Users. Enter username, password, role, account status, and user class.DClick Users Manage Users. Enter username, password, ActiveDirectory domain, account status, and role.
单选题在Access数据库窗口使用表设计器创建表的步骤依次是()。A打开表设计器、定义字段、设定主关键字、设定字段属性和表的存储B打开表设计器、设定主关键字、定义字段、设定字段属性和表的存储C打开表设计器、定义字段、设定字段的属性、表的存储和设定主关键字D打开表设计器、设定字段的属性、表的存储、定义字段和设定主关键字
单选题SELECT*FROMLOGIN_TABLEWHERE USERNAME=‘SUPERADM’的含义是:()。A显示表LOGIN_TABLE的所有USERNAME等于SUPERADM的所有记录的所有字段的信息B显示表USERNAME的所有LOGIN_TABLE等于SUPERADM的所有记录的所有字段的信息C显示表LOGIN_TABLE的所有记录的所有字段的信息D显示表LOGIN_TABLE的所有USERNAME等于SUPERADM的所有记录的字段USERNAME的信息
在数据库中,假设有一个用户表,表中含有字段:userid(int).username(varchar).password(varchar)等,该表需要设置主键,以下说法正确的是() (1.0分) [多选] A. 如果不能有同时重复的username和password,那么username和password可以组合在一起作为主键 B. 此表设计主键时,根据选择主键的最小性原则,最好采用userid作为主键 C. 此表设计主键时,根据选择主键的最小性原则,最好采用username和password作为主键 D. 如果采用userid作为主键,那么在userid列输入的数值,允许为空 E. 如果采用userid作为主键,可以在username列设置not null使得字段非空。