Use the supplied DDL SQL to create the following tables in Oracle AppEx. Perform each exercise in Oracle AppEx. Once you successfully executed the code, copy and paste your SQL and the screenshot of the result underneath each exercise, then delete the table. ALTER TABLE table_name ADD column_name column_definition; ALTER TABLE table_name MODIFY column_name column_type; ALTER TABLE table_name DROP COLUMN column_name; ALTER TABLE table_name RENAME COLUMN old_name TO new_name; ALTER TABLE table_name RENAME TO new_table_name; DROP TABLE table_name; Practice Exercise #1: Based on the departments table below, rename the departments table to depts. CREATE TABLE departments ( department_id number(10) NOT NULL, department_name varchar2(50) NOT NULL, CONSTRAINT departments_pk PRIMARY KEY (department_id) );
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.
- Use the supplied DDL SQL to create the following tables in Oracle AppEx. Perform each exercise in Oracle AppEx. Once you successfully executed the code, copy and paste your SQL and the screenshot of the result underneath each exercise, then delete the table.
ALTER TABLE table_name
ADD column_name column_definition;
ALTER TABLE table_name
MODIFY column_name column_type;
ALTER TABLE table_name
DROP COLUMN column_name;
ALTER TABLE table_name
RENAME COLUMN old_name TO new_name;
ALTER TABLE table_name
RENAME TO new_table_name;
DROP TABLE table_name;
Practice Exercise #1:
Based on the departments table below, rename the departments table to depts.
CREATE TABLE departments
( department_id number(10) NOT NULL,
department_name varchar2(50) NOT NULL,
CONSTRAINT departments_pk PRIMARY KEY (department_id)
);
Unlock instant AI solutions
Tap the button
to generate a solution