Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
In SQL
When you use ALTER TABLE to add a column, the new column:
Select one:
a. Will not be created because you cannot add a column after the table is created
b. Becomes the last column in the table
c. Can be placed by adding a GROUP BY clause
d. Becomes the first column in the table
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps
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
- Question 10 When sorting query output, you use the key words 'sort by'. Question 10 options: True Falsearrow_forwardQ1. Write a SELECT statement that returns these columns from the Invoices table: ⚫ The invoice_total column • A column that uses the ROUND function to return the invoice_total column with 1 decimal digit • A column that uses the ROUND function to return the invoice_total column with no decimal digits invoice_total one_digit 3813.33 zero_digits 3813.3 3813arrow_forwardin sql The NEXTVAL virtual column returns the integer that was most recently supplied by the sequence Select one: True Falsearrow_forward
- T-SQL procedure for MICROSOFT SQL SERVER A: obtain the name and credit limit of the customer whose number currently is stored in I_CUSTOMER_NUM. Place these values in the variables I_CUSTOMER_NAME and I_CREDIT_LIMIT, respectively. Output the content of I_CUSTOMER_NAME and I_CREDIT_LIMIT. HINT use cursor instructions as a template for the problem. Instructions goes as follows CREATE PROCEDURE usp_DISP_REP_CUST @repnum char(2) AS DECLARE@custnum char(3) DECLARE@custname char(35) DECLARE mycursor CURSOR READ_ONLY FOR SELECT CUSTOMER_NUM, CUSTOMER_NAME FROM CUSTOMER WHERE REP_NUM = @repnum OPEN mycursor FETCH NEXT FROM mycursor INTO @custnum, @custname WHILE @@FETCH_STATUS=0 BEGIN PRINT@custnum+' '+@custname FETCH NEXT FROM mycursor INTO @custnum, @custname END CLOSE mycursor DEALLOCATE mycursorarrow_forwardSQL: Dog DataIn each question below, you will define a new table based on the following tables.CREATE TABLE parents ASSELECT "abraham" AS parent, "barack" AS child UNIONSELECT "abraham" , "clinton" UNIONSELECT "delano" , "herbert" UNIONSELECT "fillmore" , "abraham" UNIONSELECT "fillmore" , "delano" UNIONSELECT "fillmore" , "grover" UNIONSELECT "eisenhower" , "fillmore";CREATE TABLE dogs ASSELECT "abraham" AS name, "long" AS fur, 26 AS height UNIONSELECT "barack" , "short" , 52 UNIONSELECT "clinton" , "long" , 47 UNIONSELECT "delano" , "long" , 46 UNIONSELECT "eisenhower" , "short" , 35 UNIONSELECT "fillmore" , "curly" , 32 UNIONSELECT "grover" , "short" , 28 UNIONSELECT "herbert" , "curly" , 31;CREATE TABLE sizes ASSELECT "toy" AS size, 24 AS min, 28 AS max UNIONSELECT "mini" , 28 , 35 UNIONSELECT "medium" , 35 , 45 UNIONSELECT "standard" , 45 , 60; Q2: By Parent HeightCreate a table by_parent_height that has a column of the names of all dogs that have a parent,ordered by the height…arrow_forwardWrite a ASQ statement to return to see all of the first names in the People table. SELECT first name FROM people; WHERE FROM People first name; FROM People SELECT first_name; First name WHERE FROM People;arrow_forward
- Write a SELECT statement that uses the ranking functions to rank products by the total quantity sold. Return these columns: The product_name column from the Products table A column named total_quantity that shows the sum of the quantity for each product in the Order_Items table A column named rank that uses the RANK function to rank the total quantity in descending sequence A column named dense_rank that uses the DENSE_RANK function to rank the total quantity in descending sequencearrow_forwardWhat is the most efficient way to access data when you have multiple tables? a) Use the VLOOKUP function to create formulas to add data from other tables b) Use an application like Microsoft Query to consolidate the data into one table c) Create relationships between tables d) Use Power Query to consolidate the data into one tablearrow_forwardWhich clause of a SQL Select statement is required if we want to display aggregate data by category such as total population by state, department, etc.? Question 40 options: 1) GROUP BY 2) ORDER BY 3) WHERE 4) FROM 5) SELECTarrow_forward
- ISBN Title Author 12345678 The Hobbit J.R.R. Tolkien 45678912 DaVinci Code Dan Brown Your student ID DBS311 Your Name use the following statement to Write the PL/SQL code to create a procedure that accepts a product price and increases it by 10%arrow_forwardQ: This is an SQL question, which is correct: Which of the following statements about JOINs are true? a. If NATURAL JOIN and FULL OUTER JOIN have the same number of rows, then LEFT OUTER JOIN AND RIGHT OUTER JOIN will not have the same number of rows. b. Number of rows in a NATURAL JOIN is always less than the number of rows in a FULL OUTER JOIN c. LEFT OUTER JOIN and RIGHT OUTER JOIN will always have the same number of rows d. Number of rows in a NATURAL JOIN can be equal to the number of rows in a FULL OUTER JOIN e. LEFT OUTER JOIN can produce more rows than FULL OUTER JOINarrow_forwardTask 3: The Car Maintenance team wants to insert and store the following maintenance types to the MAINTENANCE_TYPES table: ID: 1; Description: Tire Change; Price: 50 ID: 2; Description; Oil Change; Price: 45 ID: 3; Description; Full Cleaning; Price: 100 ID: 4; Description; Gas Pump Change; Price: 145 SQL Database Add the four maintenance types to the MAINTENANCE_TYPES table Test Query SELECT * FROM MAINTENANCE_TYPES Expected Results MAINTENANCE_TYPE_ID MAINTENANCE_TYPE_DESCRIPTION MAINTENANCE_PRICE 1 Tire Change 50 2 Oil Change 45 3 Full Cleaning 100 4 Gas Pump Change 145arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education