Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2.Look at the following SQL statement. SELECT Name FROM EmployeeWhat is the name

ID: 3650939 • Letter: 2

Question


2.Look at the following SQL statement. SELECT Name FROM EmployeeWhat is the name of the table from which this statement is retrieving data? 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 NameTypeTradingSymbolCHAR(10)CompanyNameCHAR(25)NumSharesINTPurchasePriceDOUBLESellingPriceDOUBLE3.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

Explanation / Answer

2.Employee ; Name 3.select * from Stock 4.select TradingSymbol from Stock 5.select TradingSymbol, NumShares from Stock 6.select TradingSymbol from Stock where PurchasePrice > 25 7.select * from Stock where TradingSymbol like 'SU%' 8.select TradingSymbol from Stock where SellingPrice > PurchasePrice and NumShares > 100 9.select TradingSymbol, NumShares from Stock SellingPrice > PurchasePrice and NumShares > 100 order by NumShares asc 10.insert into Stock (TradingSymbol, CompanyName, NumShares, PurchasePrice, SellingPrice) values ('XYZ', 'XYZ Company', 150, 12.55, 22.47)