当前位置:Gxlcms > 数据库问题 > 数据库练习

数据库练习

时间:2021-07-01 10:21:17 帮助过:16人阅读

-1998‘

       AND (SAL > 5000 OR SAL<1000);

 

23 What is the command to add primary key constraint to EMPNO

 

       ALTER TABLE EMP_2014170165 ADD PRIMARY KEY(EMPNO);

 

24 What is the command to add a new column EMP_family_name to existing EMP table

 

       ALTER TABLE EMP_2014170165 

       ADD EMP_family_name VARCHAR2(10);

 

25 How to drop primary key constraint for EMPNO

 

       ALTER TABLE EMP_2014170165 

       DROP PRIMARY KEY;

 

26 rename EMP table to EMPLOYEE

 

       RENAME EMP_2014170165

       TO EMPLOYEE_2014170165;

 

27 rename EMPLOYEE  back to EMP

 

       RENAME EMPLOYEE_2014170165

       TO EMP_2014170165;

 

 

28 What is the SQL command to remove column EMP_family_name from EMP table

 

       ALTER TABLE EMP_2014170165

       DROP COLUMN EMP_family_name;

 

29 What is the SQL command to copy emp table to employee table

 

       CREATE TABLE EMPLOYEE_2014170165 AS

       SELECT * FROM EMP_2014170165;

 

30 What is the SQL command to drop employee table

 

       DROP TABLE EMPLOYEE_2014170165;

 

31 What is the SQL command to display name’s of employee entered interactively from user

 

       SELECT * FROM EMP_2014170165

       WHERE ENAME = ‘&ENTER‘;

 

 

32 What is the SQL command to find the employee whose commission is NULL

 

       SELECT * FROM EMP_2014170165 WHERE COMM IS NULL;

 

数据库练习

标签:amp   create   order   orm   tail   find   var   select   ssi   

人气教程排行