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

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

【单选题】下面的代码用于执行()操作。 update tb_student SET name = ’明日’ WHERE id =1;

A.添加名字为明日的记录

B.查询名字为明日的记录

C.更新名字为明日

D.删除名字为明日的记录


参考答案和解析
仓库批发
更多 “【单选题】下面的代码用于执行()操作。 update tb_student SET name = ’明日’ WHERE id =1;A.添加名字为明日的记录B.查询名字为明日的记录C.更新名字为明日D.删除名字为明日的记录” 相关考题
考题 ( 32 )下列哪个(些)更新操作可以执行?I. UPDATE S SET 所在城市 =' 广州 ' WHERE 所在城市 =' 北京 ' ;II. UPDATE P SET 供应商号 =`B02' WHERE 供应商号 =`B01';A )仅 IB )仅 IIC )都可以D )都不可以

考题 将“学生”表中,所有女学生的“年龄”加1,正确的语句是( )。A.UPDATE学生FOR年龄=年龄+1WHERE性别="女"B.UPDATE学生WHERE年龄=年龄+1ON性别="女"C.UPDATE学生SET年龄=年龄+1WHERE性别="女"D.UPDATE学生SET年龄=年龄+1FOR性别="女"

考题 update student set s_name = ’王军’ where s_id =1 该代码执行的是哪项操作?A.添加姓名叫王军的记录B.删除姓名叫王军的记录C.返回姓名叫王军的记录D.更新姓名叫王军的记录

考题 Review the definition of the phone_list view.CHEATE OR REPLACE ALGORITHM=MERGE DEFINER= ‘root‘@localhost‘ SQL SECURITY DEFINER VIEW ‘phone_list‘ AS SELECTe . id as id ‘e . first_name AS ‘first_name‘ ‘e . last_name AS ‘last_name‘ ‘coalesce ( ph1.phone_no, ‘ – ‘) AS ‘office_no‘ ‘coalesce (ph2 .phone_no, ‘ – ‘) AS ‘cell_no‘ FROM employees e LEFT JOIN employee_phone ph1 ON ph1.emp_id = e.id AND ph1.type = ‘office‘ LEFT JOIN employee_phone ph2 ON ph2 .emp_id = e.id AND ph2 .type = ‘mobile‘The tables employees and employee_phone are InnoDB tables;all columns are used in this view. The contents of the phone_list view are as follows: Mysql select * from phone_list; 1 row in set (0.00 sec)Which method can you use to change the cell_no value to ‘555-8888‘ for John Doe?()A.INSERT INTO employee_phone (emp_id, phone_no, type) VALUES (1, ‘555-8888‘,‘mobile‘)B.UPDATE phone_list SET cell_name ‘555-8888‘ WHERE first_name= ‘John‘ and last_name= ‘Doe‘C.DELETE FROM phone_list WHERE first_name= ‘John‘ and last_name= ‘Doe‘; INSERT INTO phone_list (first_name, last_name, office_no, cell_no) VALUES (‘John‘ , ‘Doe‘ , ‘x1234‘ , ‘555-8888)D.UPDATE employee_phone SET phone_no= ‘555-8888‘ where emp_id=1

考题 Examine the structure of the EMPLOYEES table:EMPLOYEE_ID NUMBER NOT NULLEMP_NAME VARCHAR2(30)JOB_ID VARCHAR2(20) DEFAULT ‘SA_REP‘SAL NUMBERCOMM_PCT NUMBERMGR_ID NUMBERDEPARTMENT_ID NUMBERYou need to update the records of employees 103 and 115. The UPDATE statement you specify should update the rows with the values specified below:JOB_ID: Default value specified for this column definition.SAL: Maximum salary earned for the job ID SA_REP.COMM_PCT: Default value specified for this commission percentage column, if any. If no default value is specified for the column, the value should be NULL. DEPARTMENT_ID: Supplied by the user during run time through substitution variable.Which UPDATE statement meets the requirements?()A. UPDATE employees SET job_id = DEFAULT AND Sal = (SELECT MAX(sal) FROM employees WHERE job_id = ‘SA_REP‘) AND comm_pct = DEFAULT AND department_id = did WHERE employee _id IN (103,115);B. UPDATE employees SET job_id = DEFAULT AND Sal = MAX(sal) AND comm_pct = DEFAULT OR NULL AND department_id = did WHERE employee_id IN (103,115) AND job _ id = ‘SA_ REP‘;C. UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = ‘SA_REP‘), comm_pct = DEFAULT, department_id = did WHERE employee_id IN (103,115);D. UPDATE employees SET job_id = DEFAULT, Sal = MAX(sal), comm_pct = DEFAULT, department_id = did WHERE employee_id IN (103,115) AND job _ id = ‘SA_ REP‘;E. UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = ‘SA_REP‘) comm_pct = DEFAULT OR NULL, department_id = did WHERE employee_id IN (103,115);

考题 Examine the data in the EMPLOYEES and EMP_HIST tables:EMPLOYEESNAME DEPT_ID MGR_ID JOB_ID SALARYEMPLOYEE_ID101 Smith 20 120 SA_REP 4000102 Martin 10 105 CLERK 2500103 Chris 20 120 IT_ADMIN 4200104 John 30 108 HR_CLERK 2500105 Diana 30 108 IT_ADMIN 5000106 Smith 40 110 AD_ASST 3000108 Jennifer 30 110 HR_DIR 6500110 Bob 40 EX_DIR 8000120 Ravi 20 110 SA_DIR 6500EMP HISTEMPLOYEE_ID NAME JOB_ID SALARY101 Smith SA_CLERK 2000103 Chris IT_CLERK 2200104 John HR_CLERK 2000106 Smith AD_ASST 3000108 Jennifer HR_MGR 4500The EMP_HIST table is updated at the end of every year. The employee ID, name, job ID, and salary of each existing employee are modified with the latest data. New employee details are added to the table.Which statement accomplishes this task?()A. UPDATE emp_hist SET employee_id, name, job_id, salary = (SELECT employee_id, name, job_id, salary FROM employees) WHERE employee_id IN (SELECT employee_id FROM employees);B. MERGE INTO emp_hist eh USING employees e ON (eh.employee_id = e.employee_id) WHEN MATCHED THEN UPDATE SET eh.name = e.name, eh.job_id = e.job_id, eh.salary = e.salary WHEN NOT MATCHED THEN INSERT VALUES (e.employee id, e.name, job id, e.salary);C. MERGE INTO emp_hist eh USING employees e ON (eh.employee_id = e.employee_id) WHEN MATCHED THEN UPDATE emp hist SET eh.name = e.name, eh.job_id = e.job_id, eh.salary = e.salary WHEN NOT MATCHED THEN INSERT INTO emp_hist VALUES (e.employees_id, e.name, e.job_id, e.salary);D. MERGE INTO emp_hist eh USING employees e WHEN MATCHED THEN UPDATE emp_hist SET eh.name = e.name, eh.job_id = e.job_id, eh.salary = e.salary WHEN NOT MATCHED THEN INSERT INTO emp_hist VALUES (e.employees_id, e.name, e.job_id, e.salary);

考题 Examine the structure of the EMPLOYEES table:EMPLOYEE_ID NUMBER Primary KeyFIRST_NAME VARCHAR2(25)LAST_NAME VARCHAR2(25)HIRE_DATE DATEYou issue these statements:CREATE table new_emp ( employee_id NUMBER, name VARCHAR2(30));INSERT INTO new_emp SELECT employee_id , last_name from employees;Savepoint s1;UPDATE new_emp set name = UPPER(name);Savepoint s2;Delete from new_emp;Rollback to s2;Delete from new_emp where employee_id =180;UPDATE new_emp set name = ‘James‘;Rollback to s2;UPDATE new_emp set name = ‘James‘ WHERE employee_id =180;Rollback;At the end of this transaction, what is true?()A.You have no rows in the table.B.You have an employee with the name of James.C.You cannot roll back to the same savepoint more than once.D.Your last update fails to update any rows because employee ID 180 was already deleted.

考题 在下列所给的操作中,哪个操作能被执行A.UPDATE部门SET部门号=′05′WHERE部门名=′财务部′B.UPDATE部门SET部门号=′05′WHERE部门名=′服务部′C.UPDATE雇员SET工资=600 WHERE雇员号=′010′D.UPDATE雇员SET部门号=′05′WHERE雇员号=′101′

考题 已知wage.getItem().size()的值是1。要想使执行session.update(wage)时自动执行session.update(wage.getItems().get(0)),必须配置()A、<set name=”items” inverse=”true” cascade=”none”>…</set>B、<set name=”items” inverse=”false” cascade=”none”>…</set>C、<set name=”items” inverse=”true” cascade=”all”>…</set>D、<set name=”items” inverse=”false”  cascade=”save-update”>…</set>

考题 Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) HIRE_DATE DATE You issue these statements: CREATE table new_emp ( employe_id NUMBER, name VARCGAR2(30)); INSERT INTO new_emp SELECT employee_id, last_name from employees; Savepoint s1; UPDATE new_emp set name = UPPER(name); Savepoint s2; Delete from new_emp; Rollback to s2; Delete from new_emp where employee_id=180; UPDATE new_emp set name = 'James'; Rollback to s2; UPDATE new_emp sey name = 'James' Where employee_id=180; Rollback; At the end of this transaction, what is true? ()A、You have no rows in the table.B、You have an employee with the name of James.C、You cannot roll back to the same savepoint more than once.D、Your last update fails to update any rows because employee ID 180 was already deleted.

考题 将表Teacher中职称字段为"助教"人员改为"讲师",应为()A、UPDATE Teacher SET职称="助教"WHERE职称="讲师"B、UPDATE Teacher SET职称="讲师"WHERE职称="助教"C、UPDATE SET职称="助教"WHERE职称="讲师"FROMTeacherD、UPDATE SET职称="讲师"WHERE职称="助教"FROMTeacher

考题 Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2 (25) LAST_NAME VARCHAR2 (25) HIRE_DATE DATE Which UPDATE statement is valid?()A、UPDATE employees SET first_name = 'John' SET last_name = 'Smith' WHERE employee_id = 180;B、UPDATE employees SET first_name = 'John', SET last_name = 'Smoth' WHERE employee_id = 180;C、UPDATE employee SET first_name = 'John' AND last_name = 'Smith' WHERE employee_id = 180;D、UPDATE employee SET first_name = 'John', last_name = 'Smith' WHERE employee_id = 180;

考题 如何实现文章表news,id字段值为5记录的点击数字段num自增()。A、Update news set num=num+1;B、Update news set num=num+1 where id==5C、Update news set num=num++ where id=5D、Update news set num=num+1 where id=5

考题 要在tbAddress表中更新记录,下面()语句是正确的。A、Update tbAddress Set strName="萌萌",intAge=22 Where ID=2B、Update tbAddress Set strName=萌萌,intAge=22 Where strName=萌萌C、Update tbAddress Set dtmSubmit=2008-10-1 Where strName="萌萌"D、Update tbAddress Set intAge=18

考题 下列哪个(些)更新操作可以执行?() I.UPDATE S SET所在城市=‘广州’WHERE所在城市=’北京‘; II.UPDATE P SET供应商号=`B02’WHERE供应商号=`B01’;A、仅IB、仅IIC、都可以D、都不可以

考题 您需要更新居住地为亚特兰大(Atlanta)的雇员的区域代码。考虑下面的部分UPDATE语句: UPDATE 雇员 SET 区域代码=770 应在UPDATE语句中包含以下哪个子句,才能得到想要的结果?()A、UPDATE城市=Atlanta;B、SET城市=’Atlanta’;C、WHERE城市=’Atlanta’;D、LIKE’At%’;

考题 View the following SQL statements:   Transaction T1 INSERT INTO hr.regions VALUES (5,’Pole’);COMMIT;  Transaction T2 UPDATE hr.regions SET region_name=’Poles’ WHERE region_id = 5; COMMIT;  Transaction T3 UPDATE hr.regions SET region_name=’North and South Poles’ WHERE region_id = 5;   You want to back out transaction T2.  Which option would you use?()A、 It is possible,but transaction T3 also backs out.B、 It is possible with the NOCASCADE_FORCE option.C、 It is possible with the NONCONFLICT_ONLY option.D、 It is not possible because it has conflicts with transaction T3.

考题 Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER NOT NULL EMP_NAME VARCHAR2(30) JOB_ID VARCHAR2(20) DEFAULT 'SA_REP' SAL NUMBER COMM_PCT NUMBER MGR_ID NUMBER DEPARTMENT_ID NUMBER You need to update the records of employees 103 and 115. The UPDATE statement you specify should update the rows with the values specified below: JOB_ID: Default value specified for this column definition. SAL: Maximum salary earned for the job ID SA_REP. COMM_PCT: Default value specified for this commission percentage column, if any. If no default value is specified for the column, the value should be NULL. DEPARTMENT_ID: Supplied by the user during run time through substitution variable. Which UPDATE statement meets the requirements?()A、UPDATE employees SET job_id = DEFAULT AND Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP') AND comm_pct = DEFAULT AND department_id = did WHERE employee_id IN (103,115);B、UPDATE employees SET job_id = DEFAULT AND Sal = MAX(sal) AND comm_pct = DEFAULT OR NULL AND department_id = did WHERE employee_id IN (103,115) AND job_id = 'SA_REP';C、UPDATE employeesC.UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP'), comm_pct = DEFAULT, department_id = did WHERE employee_id IN (103,115);D、UPDATE employeesD.UPDATE employees SET job_id = DEFAULT, Sal = MAX(sal), comm_pct = DEFAULT, department_id = did WHERE employee_id IN (103,115) AND job_id = 'SA_REP';E、UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP'), comm_pct = DEFAULT OR NULL, department_id = did WHERE employee_id IN (103,115);

考题 Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER NOT NULL EMP_NAME VARCHAR2(30) JOB_ID VARCHAR2(20) DEFAULT 'SA_REP' SAL NUMBER COMM_PCT NUMBER MGR_ID NUMBER DEPARTMENT_ID NUMBER You need to update the records of employees 103 and 115. The UPDATE statement you specify should update the rows with the values specified below: JOB_ID: Default value specified for this column definition. SAL: Maximum salary earned for the job ID SA_REP. COMM_PCT: Default value specified for this commission percentage column, if any. If no default value is specified for the column, the value should be NULL. DEPARTMENT_ID: Supplied by the user during run time through substitution variable. Which UPDATE statement meets the requirements?()A、UPDATE employees SET job_id = DEFAULT AND Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP') AND comm_pct = DEFAULT AND department_id = did WHERE employee _id IN (103,115);B、UPDATE employees SET job_id = DEFAULT AND Sal = MAX(sal) AND comm_pct = DEFAULT OR NULL AND department_id = did WHERE employee_id IN (103,115) AND job _ id = 'SA_ REP';C、UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP'), comm_pct = DEFAULT, department_id = did WHERE employee_id IN (103,115);D、UPDATE employees SET job_id = DEFAULT, Sal = MAX(sal), comm_pct = DEFAULT, department_id = did WHERE employee_id IN (103,115) AND job _ id = 'SA_ REP';E、UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP') comm_pct = DEFAULT OR NULL, department_id = did WHERE employee_id IN (103,115);

考题 单选题如何实现文章表news,id字段值为5记录的点击数字段num自增()。A Update news set num=num+1;B Update news set num=num+1 where id==5C Update news set num=num++ where id=5D Update news set num=num+1 where id=5

考题 单选题Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2 (25) LAST_NAME VARCHAR2 (25) HIRE_DATE DATE Which UPDATE statement is valid?()A UPDATE employees SET first_name = 'John' SET last_name = 'Smith' WHERE employee_id = 180;B UPDATE employees SET first_name = 'John', SET last_name = 'Smoth' WHERE employee_id = 180;C UPDATE employee SET first_name = 'John' AND last_name = 'Smith' WHERE employee_id = 180;D UPDATE employee SET first_name = 'John', last_name = 'Smith' WHERE employee_id = 180;

考题 单选题已知wage.getItem().size()的值是1。要想使执行session.update(wage)时自动执行session.update(wage.getItems().get(0)),必须配置()A <set name=”items” inverse=”true” cascade=”none”>…</set>B <set name=”items” inverse=”false” cascade=”none”>…</set>C <set name=”items” inverse=”true” cascade=”all”>…</set>D <set name=”items” inverse=”false”  cascade=”save-update”>…</set>

考题 单选题Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER NOT NULL EMP_NAME VARCHAR2(30) JOB_ID VARCHAR2(20) DEFAULT 'SA_REP' SAL NUMBER COMM_PCT NUMBER MGR_ID NUMBER DEPARTMENT_ID NUMBER You need to update the records of employees 103 and 115. The UPDATE statement you specify should update the rows with the values specified below: JOB_ID: Default value specified for this column definition. SAL: Maximum salary earned for the job ID SA_REP. COMM_PCT: Default value specified for this commission percentage column, if any. If no default value is specified for the column, the value should be NULL. DEPARTMENT_ID: Supplied by the user during run time through substitution variable. Which UPDATE statement meets the requirements?()A UPDATE employees SET job_id = DEFAULT AND Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP') AND comm_pct = DEFAULT AND department_id = did WHERE employee_id IN (103,115);B UPDATE employees SET job_id = DEFAULT AND Sal = MAX(sal) AND comm_pct = DEFAULT OR NULL AND department_id = did WHERE employee_id IN (103,115) AND job_id = 'SA_REP';C UPDATE employeesC.UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP'), comm_pct = DEFAULT, department_id = did WHERE employee_id IN (103,115);D UPDATE employeesD.UPDATE employees SET job_id = DEFAULT, Sal = MAX(sal), comm_pct = DEFAULT, department_id = did WHERE employee_id IN (103,115) AND job_id = 'SA_REP';E UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP'), comm_pct = DEFAULT OR NULL, department_id = did WHERE employee_id IN (103,115);

考题 单选题Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER NOT NULL EMP_NAME VARCHAR2(30) JOB_ID VARCHAR2(20) DEFAULT 'SA_REP' SAL NUMBER COMM_PCT NUMBER MGR_ID NUMBER DEPARTMENT_ID NUMBER You need to update the records of employees 103 and 115. The UPDATE statement you specify should update the rows with the values specified below: JOB_ID: Default value specified for this column definition. SAL: Maximum salary earned for the job ID SA_REP. COMM_PCT: Default value specified for this commission percentage column, if any. If no default value is specified for the column, the value should be NULL. DEPARTMENT_ID: Supplied by the user during run time through substitution variable. Which UPDATE statement meets the requirements?()A UPDATE employees SET job_id = DEFAULT AND Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP') AND comm_pct = DEFAULT AND department_id = did WHERE employee _id IN (103,115);B UPDATE employees SET job_id = DEFAULT AND Sal = MAX(sal) AND comm_pct = DEFAULT OR NULL AND department_id = did WHERE employee_id IN (103,115) AND job _ id = 'SA_ REP';C UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP'), comm_pct = DEFAULT, department_id = did WHERE employee_id IN (103,115);D UPDATE employees SET job_id = DEFAULT, Sal = MAX(sal), comm_pct = DEFAULT, department_id = did WHERE employee_id IN (103,115) AND job _ id = 'SA_ REP';E UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP') comm_pct = DEFAULT OR NULL, department_id = did WHERE employee_id IN (103,115);

考题 单选题Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) HIRE_DATE DATE You issue these statements: CREATE table new_emp ( employee_id NUMBER, name VARCHAR2(30)); INSERT INTO new_emp SELECT employee_id , last_name from employees; Savepoint s1; UPDATE new_emp set name = UPPER(name); Savepoint s2; Delete from new_emp; Rollback to s2; Delete from new_emp where employee_id =180; UPDATE new_emp set name = 'James'; Rollback to s2; UPDATE new_emp set name = 'James' WHERE employee_id =180; Rollback; At the end of this transaction, what is true?()A You have no rows in the table.B You have an employee with the name of James.C You cannot roll back to the same savepoint more than once.D Your last update fails to update any rows because employee ID 180 was already deleted.

考题 单选题Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) HIRE_DATE DATE You issue these statements: CREATE table new_emp ( employe_id NUMBER, name VARCGAR2(30)); INSERT INTO new_emp SELECT employee_id, last_name from employees; Savepoint s1; UPDATE new_emp set name = UPPER(name); Savepoint s2; Delete from new_emp; Rollback to s2; Delete from new_emp where employee_id=180; UPDATE new_emp set name = 'James'; Rollback to s2; UPDATE new_emp sey name = 'James' Where employee_id=180; Rollback; At the end of this transaction, what is true?()A You have no rows in the table.B You have an employee with the name of James.C You cannot roll back to the same savepoint more than once.D Your last update fails to update any rows because employee ID 180 was already deleted.

考题 单选题View the following SQL statements:   Transaction T1 INSERT INTO hr.regions VALUES (5,’Pole’);COMMIT;  Transaction T2 UPDATE hr.regions SET region_name=’Poles’ WHERE region_id = 5; COMMIT;  Transaction T3 UPDATE hr.regions SET region_name=’North and South Poles’ WHERE region_id = 5;   You want to back out transaction T2.  Which option would you use?()A  It is possible,but transaction T3 also backs out.B  It is possible with the NOCASCADE_FORCE option.C  It is possible with the NONCONFLICT_ONLY option.D  It is not possible because it has conflicts with transaction T3.

考题 单选题下列哪个(些)更新操作可以执行?() I.UPDATE S SET所在城市=‘广州’WHERE所在城市=’北京‘; II.UPDATE P SET供应商号=`B02’WHERE供应商号=`B01’;A 仅IB 仅IIC 都可以D 都不可以