Write an ALTER TABLE statement that adds two new columns to the Products table created above....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write an ALTER TABLE statement that adds two new columns to the Products table created above. • Add one column for product price that provides for three digits to the left of the decimal point and two to the right. This column should have a default value of 9.99. • Add one column for the date and time that the product was added to the database. Write an ALTER TABLE statement that modifies the Users table created in exercise 2 so the first_name column cannot store NULL values and can store a maximum of 20 characters. • Code an UPDATE statement that attempts to insert a NULL value into this column. It should fail due to the NOT NULL constraint. • Code another UPDATE statement that attempts to insert a first name that's longer than 20 characters. It should fail due to the length of the column. n 6. 7 X 8 alter table products add column price decimal(5,3) not null constraint (9.99), add Product_Date datetime null; Write an ALTER TABLE statement that adds two new columns to the Products table created above. • Add one column for product price that provides for three digits to the left of the decimal point and two to the right. This column should have a default value of 9.99. • Add one column for the date and time that the product was added to the database. Write an ALTER TABLE statement that modifies the Users table created in exercise 2 so the first_name column cannot store NULL values and can store a maximum of 20 characters. • Code an UPDATE statement that attempts to insert a NULL value into this column. It should fail due to the NOT NULL constraint. • Code another UPDATE statement that attempts to insert a first name that's longer than 20 characters. It should fail due to the length of the column. n 6. 7 X 8 alter table products add column price decimal(5,3) not null constraint (9.99), add Product_Date datetime null;
Expert Answer:
Answer rating: 100% (QA)
Answer For the Products table Add a column for product price ALTER TABLE Products AD... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these databases questions
-
Sweeten Company had no jobs in progress at the beginning of the year and no beginning inventories. It started, completed, and sold only two jobs during the year Job P and Job Q . The company uses a...
-
a) Find the set of solutions of each of the linear congruence: i. 8x = 12 (mod 28). ii. 7x = 1 (mod 9). b) Hashing Function is used to assign a memory location for the records in the computer (For...
-
1 ) Describe the key differences between equity and debt 2 ) What is preferred stock? 3 ) Describe the concept of Market Efficiency?
-
Give a recursive algorithm for finding the reversal of a bit string. (See the definition of the reversal of a bit string in the preamble of Exercise 34 in Section 5.3.)
-
What are some of the historical assumptions behind the characteristics of "great leaders"?
-
What steps should the exporter take to ensure success in working with intermediaries?
-
Fill in the Blank. \(\mathrm{A}(\mathrm{n})\) ___________ is the interval between any two frequencies \(\left(f_{2}-f_{1} ight)\) whose frequency ratio \(\left(\frac{f_{2}}{f_{1}} ight)\) is 2.
-
A farmer in Georgia has a 100-acre farm on which to plant watermelons and cantaloupes. Every acre planted with watermelons requires 50 gallons of water per day and must be prepared for planting with...
-
In the context of project management, how can control management methodologies, such as earned value management (EVM) and agile control, be integrated to provide a more comprehensive approach to...
-
Discuss the use of business analytics in sports, such as tennis, cricket, swimming, and football. Identify as many opportunities as you can for each.
-
For the asset shown in the following table, use the capital asset pricing model and find out the required return. Risk free Rate , R F Market Return r m Beta , b 3% 11% 1.8
-
Find a job description that interests you. Based on the tasks and qualifications, list the job competencies and specialized skills the company seeks, for example, detail orientation, customer...
-
Three main modules included in the Apache NetBeans IDE are . a. JEUS 7 application server, JBoss Application Server 6, Caucho Resin 4.0 b. Java EE, Java SE, Maven c. NetBeans Profiler, GUI design...
-
Working in small groups, plan a presentation to different audiences. Imagine that youre the management team of a moving company and are announcing the acquisition of a storage company. The storage...
-
The NetBeans IDE is an open-source integrated development environment, and it only supports development of all Java application types. (True/False)
-
Watch two TED Talks. Identify storieseither parts of a presentation or the entire presentation as a story. How does each story follow the format shown in Figure 3? In what ways does it differ? How...
-
A private clinic evaluates two alternative investment programs, A and B, with a lifetime of 5 years and a cost of 150,000 euros. The clinic estimates that each of these programs will yield additional...
-
Fill in each blank so that the resulting statement is true. 83 + 103 = ______ .
-
In 2012, Michael has net short-term capital losses of $2,000, a net long-term capital loss of $45,000, and other ordinary taxable income of $45,000. a. Calculate the amount of Michael's deduction for...
-
Mike sells his home to Jane on April 2, 2012. Jane pays the property taxes covering the full calendar year in October, which amount to $2,500. How much may Mike and Jane each deduct for property...
-
Steve Jackson (age 51) is a single taxpayer living at 3215 Pacific Dr., Del Mar, CA 92014. His Social Security number is 465-88-9415. In 2012, Steve's earnings and income tax withholding as the...
-
Prove that van der Waals constants \((a, b)\) can be expressed in terms of critical temperature and pressure as follows: a = 27 R 2 T 2 c 64 P c b = R T c 8 P c a = 27 R 2 T c 2 64 P c b = R T c 8 P c
-
Show that where \[ \left(\frac{\partial U}{\partial V} ight)_{T}=\frac{T \beta}{\kappa}-P \] \(\beta=\) Coefficient of volume expansion \(\kappa=\) Isothermal compressibility.
-
Derive Maxwell's relations.
Study smarter with the SolutionInn App