Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write SQL code to create a STUDENT table that includes the following attributes: Student ID First Name Last Name Street Address City State Zip

1. Write SQL code to create a STUDENT table that includes the following attributes:

Student ID

First Name

Last Name

Street Address

City

State

Zip Code

Phone

Email

In the code remember to include data type, data size, and if that field is required or not. The selected data types and data size should be logical. For example you cannot use Char (10) for street address; size 10 is very small compared to many long street addresses that we deal with every day. Having a short size data will create error messages.

2. Write SQL code to create the COURSE table. Add the proper attributes for the course table as needed. Remember to include data type, data size, and if that field is required or not.

3. Write SQL statement to :

Insert at least three rows of fake data (any names, any addresses, so on) into the two tables created above.

Add a column called ExpecGradDate to the STUDENT table.

Add a new constraint to limit the student zip code to be within the following group (32117, 32116, 32115, 32114)

Count the number of rows in the table and save them in a new column

Show the first 3 records of data.

Delete the column ExoecGradDate.

Create a VIEW STATEMENT that shows only First Name, Last Name, and Email

Display records of students living in area code 32114.

Delete the table student

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

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions

Question

Define sampling, sample population, and sample size.

Answered: 1 week ago