A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
expand_more
expand_more
format_list_bulleted
Question
Chapter 3, Problem 7TD
Program Plan Intro
Data type:
The data type is used to store the type of data which should be specified for the column in a table.
Some of the commonly used data types are:
- CHAR(n)
- VARCHAR(n)
- DATE
- NUMBER
- DECIMAL(p,q)
- INT
- SMALLINT
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Show the structure view of the table to see the field name ,field properties and it's
data type.
The team wants to track potential list of users who may have forgotten their items on the cars. Therefore, you need to return USER_FIRST_NAME, USER_LAST_NAME, TRAVEL_START_TIME, TRAVEL_END_TIME information from the USERS and TRAVELS tables connected inside a JOIN statement by the USING function and USER_ID field
Create a new table named PRODUCT. The product table will have two attributes;
product ID as integer, not null, and a primary key constraint set to unique.
product description as varchar(30), not null specification.
When it says not null , I am not sure if i check the allow null box or not ? Also it says a primary key contraint set to unique? I don't know how to do that part.
Chapter 3 Solutions
A Guide to SQL
Ch. 3 - Prob. 1RQCh. 3 - How do you delete a table using SQL?Ch. 3 - Prob. 3RQCh. 3 - Prob. 4RQCh. 3 - Prob. 5RQCh. 3 - Prob. 6RQCh. 3 - Prob. 7RQCh. 3 - Prob. 8RQCh. 3 - Prob. 9RQCh. 3 - Prob. 10RQ
Ch. 3 - Prob. 11RQCh. 3 - Prob. 12RQCh. 3 - Prob. 13RQCh. 3 - Use SQL to complete the following exercises....Ch. 3 - Prob. 2TDCh. 3 - Prob. 3TDCh. 3 - Prob. 4TDCh. 3 - Prob. 5TDCh. 3 - Prob. 6TDCh. 3 - Prob. 7TDCh. 3 - Prob. 1CATCh. 3 - Add the following row to the ADVENTURE_TRIP table:...Ch. 3 - Prob. 3CATCh. 3 - Prob. 4CATCh. 3 - Prob. 5CATCh. 3 - Prob. 6CATCh. 3 - Review the data for the TRIP table in Figure 1-5...Ch. 3 - Colonial Adventure Tours would like to increase...Ch. 3 - Prob. 1SCGCh. 3 - Add the following record to the VACATION_UNIT...Ch. 3 - Delete the VACATION_UNIT table.Ch. 3 - Prob. 4SCGCh. 3 - Prob. 5SCGCh. 3 - Prob. 6SCGCh. 3 - The SERVICE_REQUEST table uses the CHAR data type...
Knowledge Booster
Similar questions
- The SERVICE_REQUEST table uses the CHAR data type for the DESCRIPTION and STATUS fields. Is there an alternate data type that could be used to store the values in these fields? Justify your reason for choosing an alternate data type or for leaving the data type as CHAR.arrow_forwardReview the data for the TRIP table in Figure 1-5 in Chapter 1 and then review the data types used to create the TRIP table in Figure 3-39. Suggest alternate data types for at least two fields that currently have the CHAR data type and at least two fields that currently have the DECIMAL data type. Create but do not execute the SQL command to create the TRIP table using these alternate data types.arrow_forwardWhen must you define constraints at the table level rather than the column level?arrow_forward
- Modify the MODEL table to add the attribute shown in the following table. MOD_WAIT_CHG should support up to 5 digits to the left of the decimal place and 2 digits to the right of the decimal place..arrow_forwardCreate a new table named PRODUCT. The product table will have two attributes; product ID as integer, not null, and a primary key constraint set to unique. product description as varchar(30), not null specification. I am not sure how to do a primary key contraint set to unique. I believe I did the first two correct.arrow_forwardhow is the ProductID field in the Product table specified to be required? Why is it a required attribute?arrow_forward
- The StayWell maintenance team wants to minimize the number of planned visits to properties. The team wants to learn all the properties that have different planned service dates. You need to return all available data in the SERVICE_REQUEST table, where requests are made for the same property with a different NEXT_SERVICE_DATE. Return a list of all properties where service requests are made with different NEXT_SERVICE_DATE values.arrow_forwardThis doesn't have the rollback or insert it into the maintenances tablearrow_forwardPlease help with the following What is a valid GROUP BY clause for the following SELECT list? SELECT Pub_ID, Type, Max(Price) Select one: a. GROUP BY Pub_ID, Type, Price b. GROUP BY Pub_ID, Type, Max(Price) c. GROUP BY max(Price) d. GROUP BY Pub_ID, Typearrow_forward
- Create a NONCAT table with the structure shown in Figure 6-28. Insert into the NONCAT table the item ID, description, number of units on hand, category, and unit price from the ITEM table for each item that is not in category CAT. In the NONCAT table, change the description of item ID DT12 to “Dog Toy Gift Bonanza.”arrow_forwardEmployees table—the data Open the Employees table in Datasheet View. You should now see the data currently in the Employees table, as in Figure 19.3. Scan the data to become familiar with the kind of data being stored. In this view, you would be able to add, delete, or modify data in the table. Click the small + sign beside the employee with ID 149. What do you see? Why do you see it? (Hint: think about the relationships between the tables.) Would you expect to see + signs in either of the other two tables?arrow_forward1) List all the functional dependencies of the above table. (Note, this requires you to state all the functional dependencies, not just count the number). 2) What normal form(s) is the table currently in? Justify your answer.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology PtrNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
- Database Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781285196145Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos CoronelPublisher:Cengage Learning
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning