![]() ![]() The following Oracle ALTER TABLE statement would drop the salary column from the employees table: ALTER TABLE employeesĭROP COLUMN salary Practice Exercise #7:īased on the departments table below, rename the department_name column to dept_name.Pharmacokinetics describes how the body affects a specific xenobiotic/chemical after administration through the mechanisms of absorption and distribution, as well as the metabolic changes of the substance in the body (e.g. State varchar2(2)) Practice Exercise #6:īased on the employees table below, drop the salary column. ![]() MODIFY (customer_name varchar2(50) NOT NULL, The following Oracle ALTER TABLE statement would modify the customer_name and state columns accordingly in the customers table: ALTER TABLE customers MODIFY employee_name varchar2(75) Practice Exercise #5:īased on the customers table below, change the customer_name column to NOT allow null values and change the state column to a varchar2(2) datatype. The following Oracle ALTER TABLE statement would change the datatype for the employee_name column to varchar2(75): ALTER TABLE employees ![]() Last_contacted date) Practice Exercise #4:īased on the employees table below, change the employee_name column to a varchar2(75) datatype. The following Oracle ALTER TABLE statement would add the contact_name and last_contacted columns to the customers table: ALTER TABLE customers CREATE TABLE customersĬONSTRAINT customers_pk PRIMARY KEY (customer_id) The following Oracle ALTER TABLE statement would add a bonus column to the employees table: ALTER TABLE employeesĪDD bonus number(6) Practice Exercise #3:īased on the customers table below, add two columns - one column called contact_name that is a varchar2(50) datatype and one column called last_contacted that is a date datatype. ![]() CREATE TABLE employeesĬONSTRAINT employees_pk PRIMARY KEY (employee_number) The following Oracle ALTER TABLE statement would rename the departments table to depts: ALTER TABLE departmentsīased on the employees table below, add a column called bonus that is a number(6) datatype. CREATE TABLE departmentsĬONSTRAINT departments_pk PRIMARY KEY (department_id) Based on the departments table below, rename the departments table to depts. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |