Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 3, Problem 4HOA
Modify the Job_class column of the EMPLOYEES table so that it allows storing a maximum width of two characters.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
The SAS table hold.work contains a numeric column named ID. Write an entire DATA step to create a table named hold.work2 that is a copy of hold.work but additionally contains a new character column named Name. Name should have the value "Food" when the existing numeric column ID is 50, and it should have the value "Ok" otherwise. [Note: Make sure the entire value is stored.]
he Horse table has the following columns:
ID - integer, primary key
RegisteredName - variable-length string
Breed - variable-length string
Height - decimal number
BirthDate - date
Write a SELECT statement to select the registered name, height, and birth date for only horses that have a height between 15.0 and 16.0 (inclusive) or have a birth date on or after January 1, 2020.
Create "automatically" the table header represented by the left column, the functions used mysql_list_fields and mysql_field_name
Chapter 3 Solutions
Oracle 12c: SQL
Ch. 3 - Which command is used to create a table based on...Ch. 3 - Prob. 2RQCh. 3 - What guidelines should you follow when naming...Ch. 3 - What is the difference between dropping a column...Ch. 3 - Prob. 5RQCh. 3 - What happens to the existing rows of a table if...Ch. 3 - Explain the difference between truncating a table...Ch. 3 - Prob. 8RQCh. 3 - What happens if you try to decrease the scale or...Ch. 3 - Are a table and the data contained in the table...
Ch. 3 - Which of the following is a correct statement?
You...Ch. 3 - Prob. 2MCCh. 3 - Which of the following is not a correct...Ch. 3 - Which of the following is not a valid SQL...Ch. 3 - Which of the following is true? a. If you truncate...Ch. 3 - Which of the following commands creates a new...Ch. 3 - Which of the following commands drops any columns...Ch. 3 - Which of the following statements is correct?
A...Ch. 3 - Which of the following commands removes all data...Ch. 3 - Which of the following commands changes a table’s...Ch. 3 - Prob. 11MCCh. 3 - Which of the following is not a valid...Ch. 3 - Which of the following characters can be used in a...Ch. 3 - Which of the following is true?
All data in a...Ch. 3 - Prob. 15MCCh. 3 - Which of the following commands creates a new...Ch. 3 - Which of the following is a valid table name? a....Ch. 3 - Prob. 18MCCh. 3 - Which object in the data dictionary enables you to...Ch. 3 - Prob. 20MCCh. 3 - Create a new table containing the category code...Ch. 3 - Create a new table containing these four columns:...Ch. 3 - Add two columns to the EMPLOYEES table. One...Ch. 3 - Modify the Job_class column of the EMPLOYEES table...Ch. 3 - Prob. 5HOACh. 3 - Rename the EMPLOYEES table as JL_EMPS.
Ch. 3 - Create a new table containing these four columns...Ch. 3 - Prob. 8HOACh. 3 - Truncate the BOOK_PRICING table, and then verify...Ch. 3 - Delete the BOOK_PRICING table permanently so that...
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Add a new row in the ORDERS table with the following data: Order# = 1023 and Customer# = 1009. Describe the error raised and what caused the error.arrow_forwardAdd a new customer row by using the sequence created in Question 1. The only data currently available for the customer is as follows: last name = Shoulders, first name = Frank, and zip = 23567.arrow_forwardAdd a new row in the ORDERS table with the following data: Order# = 1022, Customer# = 2000, and Order date = August 6, 2009. Describe the error raised and what caused the error.arrow_forward
- 1- Display contact First name and contact Last name for customers after sorting the customersby their contact Last name in ascending order.2- selects the order line items (orderNumber, orderlinenumber) from the “orderdetails” table.Also, display the subtotal (quantityOrdered * priceEach) for each line item and sorts the resultset based on the subtotal descending .3- Display unique last names from employees table ordered by last name.4- Display customerNumber, customerName and creditLimit for getting the top five customerswho have the highest creditLimit.5- Find customer Name, customer country, sales representative employee number fromcustomers who do not have a sales representative.6- For each order status, display status and count of orders have this status.7- For Each order number in order details table, Display order number, sum of quantity ordered(itemsCount) and sum of (priceEach * quantityOrdered) as total. With condition “total”greater than 1000.8- Display product code, product…arrow_forwardThe Horse table has the following columns: ID - integer, primary key RegisteredName - variable-length string Breed - variable-length string Height - decimal number BirthDate - date Write a SELECT statement to select the registered name and height for only horses that have an above average height. Order the results by height (ascending).arrow_forwardAssignment Two: We will write three procedures on our tables, the first of which I have provided as an example. proclnsertPlayer takes one IN VARCHAR(16) paramater and returns an error code in the second SMALLINT (INOUT) parameter. The procedure checks the parameter and, if there are no errors, inserts the value into tblPlayers. Documentation of errors Condition Error code No errors 1st param Null or zero len playerID taken 1 proclnsertGame will receive two IN VARCHAR(16) interpreted asarrow_forward
- THIS MODULE IS ABOUT SUBQUERIES, SO YOU MUST USE SUBQUERIES INSTEAD OF TABLE JOINS IN THISASSIGNMENT.arrow_forwardInsert any 5 rows of athletes including your details into the Athletics table you created in the previous Question. The table created previously CREATE TABLE Athletics ( AthleteID int NOT NULL First_name varchar(255) NOT NULL, Last_name varchar(255) NOT NULL, DOB DATE NOT NULL, SportsCode INT, Date_Last_event DATE, PRIMARY KEY (ID) ); varchar(255) use for define string column, int stand for integer field etc.arrow_forwardDatabase Q1: Which one of the following INSERT statements will successfully insert a single row? The following table has been created: CREATE TABLE student_table ( stud_id NUMBER (6), last_name VARCHAR2 (20), first_name VARCHAR2 (20), lunch_num NUMBER (4) ; a) INSERT VALUES INTO student_table (143354, ‘Roberts’, ‘Cameron’, 6543); b) INSERT INTO student_table COLMUNS (stud_id, last_name, lunch_num) VALUES (143352, ‘Roberts’, 5543, ‘Cameron’); c) INSERT TO student_table (stud_id, lunch_num, first_name, last_name) VALUES (143352, 6543, ‘Cameron’, ‘Roberts’); d) INSERT INTO student_table VALUES (143354, ‘Roberts’, ‘Cameron’, 6543); Q2: What does the following SQL statement display: SELECT EMP_ID, LAST_NAME, SALARY FROM EMPLOYEES WHERE SALARY > (SELECT MIN (E. SALARY) FROM EMPLOYEES E) ORDER BY SALARY DESC; a) Employees information who earn less money than the maximum salary b) Employees information who earn more money than the highest employee salary c) Employees information who earn…arrow_forward
- CREATE TABLE employees ( employee_number int NOT NULL, last_name char(50) NOT NULL, first_name char(50) NOT NULL, salary int, dept_id int, CONSTRAINT employees_pk PRIMARY KEY (employee_number) ) ; INSERT INTO employees (employee_number, last_name, first_name, salary, dept_id) VALUES (1001, Smith', 'John', 62000, 500); INSERT INTO employees (employee_number, last_name, first_name, salary, dept_id) VALUES (1002, 'Anderson', 'Jack', 57500, 500); INSERT INTO employees (employee_number, last_name, first_name, salary, dept_id) VALUES (1003, 'Everest', 'Brad', 71000, 501); INSERT INTO employees (employee_number, last_name, first_name, salary, dept_id) VALUES (1004, Horvath', 'Jack', 42000, 501); PROBLEMS: 1. Create a select statement that will show all employees that have more than 50000 as their salary. 2. Create a select statement that will show all employees belonging into department 501. 3. Create a select statement that has a first name of Jack arranged them alphabetically in ascending…arrow_forwardGuided Table Build: We will be Creating a Table called Student For the 6 following questions, your submission will be the query that shows you’ve created the table conforming to the requirements. Create a Table Named Student. The first column should be named ID, and have a data type of Integer The second column should be named First_Name, and have a data type of varchar(255). The third column should be named Last_Name, and have a data type of varchar(255) The fourth column should be named DOB (short for date of birth), and have a data type of date. The firth column should be named Adv_ID (short for advisor ID), and have a data type of integer.arrow_forwardThe Horse table has the following columns: ID - integer, primary key RegisteredName - variable-length string Breed - variable-length string Height - decimal number BirthDate - date Write a SELECT statement to select the registered name, height, and birth date for only horses that have a height between 15.0 and 16.0 (inclusive) or have a birth date on or after January 1, 2020. -- Your SELECT statement goes hereSELECT *FROM HorseWHERE (Height >= '15.0' AND Height <= '16.0') OR BirthDate >= '2020-01-01';arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
- COMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE LA Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
How to Design DB Tables for any Application? (The Basics); Author: Studytonight;https://www.youtube.com/watch?v=XUdNVaSikqY;License: Standard YouTube License, CC-BY
Create a Table (Introduction to Oracle SQL); Author: Database Star;https://www.youtube.com/watch?v=BiV1IrzB1sY;License: Standard Youtube License