What SQL script (either MySQL or SQL Server) will create a database named Coupon
ID: 3604511 • Letter: W
Question
What SQL script (either MySQL or SQL Server) will create a database named CouponMgr? Don’t worry about all the options; just enough to create the database.
2. What SQL script (either MySQL or SQL Server) will create a table named Coupons in the CouponMgr databaser? CouponID -- an integer -- is the primary key, IssuedTo -- 15 or less characters of text -- and CouponAmount -- Money or two place decimal value -- are the columns. Don’t worry about all the options; just enough to create the table.
3. What SQL script (either MySQL or SQL Server) will insert a record with a CouponID of 1234, IssuedTo equal to your GRU login ID, and CouponAmount equal to $1000 plus the last three digits of your student number? Don’t worry about all the options; just enough to create the record.
4. What SQL script (either MySQL or SQL Server) will return all records (with all columns) from the Coupons table?
5. What SQL script (either MySQL or SQL Server) will delete all records (with all columns) from the Coupons table (but leave the empty table)? What SQL will remove the table entirely?
Explanation / Answer
1)CREATE DATABASE CouponMgr
2)create table Coupons(CouponID int ,IssuedTo char(15),CouponAmount money)
3)insert into Coupons values(1234,'GRU',$1000)
4)select * from Coupons
5)Truncate table Coupons
if you want to delete all the table with columns
delete table Coupons
Hope this will helps you.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.