Project #69119 - 10 Java Database Questions

MAX BUDGET $ 70 

 

Answer the 10 Questions below using Chapter 15 Attached.  

 

1. What SQL data types correspond with the following Java types?

int

float

String

double

 

2. Look at the following SQL statement.

 

SELECT Name FROM Employee

 

a. What is the name of the table from which this statement is retrieving data?

b. What is the name of the column that is being retrieved?

 

For Questions 3 through 11, assume that a database has a table named Stock,

with the following columns:

 

Column Name Type

TradingSymbol CHAR(10)

CompanyName CHAR(25)

NumShares INT

PurchasePrice DOUBLE

SellingPrice DOUBLE

 

3. Write a SELECT statement that returns all the columns from every row in table.

 

4. Write a SELECT statement that returns the TradingSymbol column from every

row in table.

 

5. Write a SELECT statement that returns the TradingSymbol column and the

NumShares column from every row in table.

 

6. Write a SELECT statement that returns the TradingSymbol column only from the

rows where PurchasePrice is greater than 25.00.

 

7. Write a SELECT statement that returns all the columns from the rows where

TradingSymbol starts with “SU”.

 

8. Write a SELECT statement that returns the TradingSymbol column only from the

rows where SellingPrice is greater than PurchasePrice and NumShares is

greater than 100.

 

9. Write a SELECT statement that returns the TradingSymbol column and the

NumShares column only from the rows where SellingPrice is greater than

PurchasePrice and NumShares is greater than 100. The results should be sorted

by the NumShares column in ascending order.

 

10. Write an SQL statement that inserts a new row into the Stock table. The row should have the following column values:

TradingSymbol: XYZ

CompanyName: “XYZ Company”

NumShares: 150

PurchasePrice: 12.55

SellingPrice: 22.47

Subject Computer
Due By (Pacific Time) 05/02/2015 08:00 am
Report DMCA
TutorRating
pallavi

Chat Now!

out of 1971 reviews
More..
amosmm

Chat Now!

out of 766 reviews
More..
PhyzKyd

Chat Now!

out of 1164 reviews
More..
rajdeep77

Chat Now!

out of 721 reviews
More..
sctys

Chat Now!

out of 1600 reviews
More..
sharadgreen

Chat Now!

out of 770 reviews
More..
topnotcher

Chat Now!

out of 766 reviews
More..
XXXIAO

Chat Now!

out of 680 reviews
More..
All Rights Reserved. Copyright by AceMyHW.com - Copyright Policy