Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implementation of Statements (Non-Persistent) Implement the following Statements the tables only need to exist during execution. create table TABLE_NAME ( COLUMN_NAME TYPE, COLUMN_NAME TYPE, COLUMN_NAME

Implementation of Statements (Non-Persistent)

Implement the following Statements the tables only need to exist during execution.

create table TABLE_NAME (

COLUMN_NAME TYPE,

COLUMN_NAME TYPE,

COLUMN_NAME TYPE,

....

);

TABLE_NAME is the name of the table being created. Make sure that a table with that name doesnt already exist.

COLUMN_NAME is the name of the column being created. Make sure that there are no two columns in a single table of the same name.

TYPE is the type of the data stored in the field of the table. The valid types are: integer, float, boolean, char, char(n) where n is an integer (fixed length string).

drop table TABLE_NAME;

Deletes the table and data for the table that matches the TABLE_NAME.

alter table TABLE_NAME add COLUMN_NAME TYPE;

NOTE: If the table already has data the added column will be set to NULL

alter table TABLE_NAME drop COLUMN_NAME;

Removes the Column from the table and its data (if any exist).

alter table TABLE_NAME alter COLUMN_NAME TYPE;

Changes the type of the specified column. CANNOT be performed on a table with data.

insert into TABLE_NAME (COLUMN_NAME_LIST) values (VALUES_LIST);

NOTE: COLUMN_NAME_LIST length must match VALUES_LIST length

update TABLE_NAME set COLUMN_UPDATE_LIST where BOOLEAN_EXPRESSION;

Where clause is optional. If where clause isnt added each record is updated.

NOTE: COLUMN_UPDATE_LIST is the following:

COLUMN_NAME = VALUE, COLUMN_NAME = VALUE, ...

delete from TABLE_NAME where BOOLEAN_EXPRESSION;

where BOOLEAN_EXPRESSION is optional. Deletes any record in the table that causes the BOOLEAN_EXPRESSION to be true. If the where clause isnt added delete each record.

select distinct COLUMN_NAME, COLUMN_NAME, from TABLE_EXPRESSION;

select COLUMN_NAME_LIST from TABLE_EXPRESSION;

NOTE: COLUMN_NAME_LIST can be the following:

COLUMN_NAME, COLUMN_NAME,

* denotes ALL columns. EX. select * from Student;

NOTE: TABLE_EXPRESSION can be the following:

TABLE_NAME

A nested SELECT_STATEMENT in parenthesis.

TABLE_EXPRESSION natural join TABLE_EXPRESSION

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions

Question

How can financial information be consistent but not comparable?

Answered: 1 week ago

Question

=+4 How does one acquire a global mindset?

Answered: 1 week ago

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago