Hi Can someone please help me generate SQL for this question. Create EMPLOYEES_2 table based on the structure of EMPLOYEES table. Include only the employee_id, initial of the first name, last name, last 4 digits of the phone number, salary divided by 2, and department_id. Name the colums as follows, ID, INITIAL, SURNAME, PHONE EXTENSION, SALARY, DEPARTMENT. any help is greatly appreciated.
hi, If you want to create a database table then the syntax for creating is Create table EMPLOYEES_2(ID number(3),INITIAL varchar2(10),SURNAME varchar2(20),PHONE_EXTENION number(3),SALARY number(5,3), DEPARTMENT varchar2(20);
More like Create table EMPLOYEES_2(ID number(3),INITIAL varchar2(1),SURNAME varchar2(20),PHONE_EXTENSION varchar2(4),SALARY number(5,3), DEPARTMENT varchar2(20); The extension has to be 4 characters (the number 0012 is stored as 12 if it's a number), and the initial is a single character. (The ID may need a larger number - it depends on how many employees there may ever be.)