SlideShare une entreprise Scribd logo
1  sur  1
Using the class example database (SQLFUN), create the required SQL statements to produce the
following results: add a new food to the L_foods table from a new supplier, add Fresh Salmon as
menu-item 11, The supplier_id is CFF, The product_code is SA, the price is $8.25, there is no
price_increase value. Step 1: Add CFF to the L_supplier table(the name of this supplier is
Cathy's Fresh Fish). Step 2: In oracle or mySQL, make these two inserts in a single transaction.
Solution
Using transaction, we can make two insert statements into single transaction.
START TRANSACTION;
INSERT INTO L_Supplier (supplier_id, name) VALUES ('CFF', 'Cathy's Fesh Fish');
INSERT INTO L_foods (id, supplier_id, menu_item, product_code, price) VALUES (1, 'CFF',
11, 'SA', 8.25);
COMMIT;

Contenu connexe

Plus de rtodd575

Plus de rtodd575 (6)

Using Java- Evaluate the expression- Be sure to list a value of approp.docx
Using Java- Evaluate the expression- Be sure to list a value of approp.docxUsing Java- Evaluate the expression- Be sure to list a value of approp.docx
Using Java- Evaluate the expression- Be sure to list a value of approp.docx
 
Use your favorite search engine to find the IRSSolutionS corporations.docx
Use your favorite search engine to find the IRSSolutionS corporations.docxUse your favorite search engine to find the IRSSolutionS corporations.docx
Use your favorite search engine to find the IRSSolutionS corporations.docx
 
Wade draws a correlation between _____________________ and the onset o.docx
Wade draws a correlation between _____________________ and the onset o.docxWade draws a correlation between _____________________ and the onset o.docx
Wade draws a correlation between _____________________ and the onset o.docx
 
Virtualization and the cloud Explain the differences between virtualiz.docx
Virtualization and the cloud Explain the differences between virtualiz.docxVirtualization and the cloud Explain the differences between virtualiz.docx
Virtualization and the cloud Explain the differences between virtualiz.docx
 
Use the following terms to answer the question(s) below- A- This react.docx
Use the following terms to answer the question(s) below- A- This react.docxUse the following terms to answer the question(s) below- A- This react.docx
Use the following terms to answer the question(s) below- A- This react.docx
 
Use the method of substitution to find the stationary values of Z- i-e.docx
Use the method of substitution to find the stationary values of Z- i-e.docxUse the method of substitution to find the stationary values of Z- i-e.docx
Use the method of substitution to find the stationary values of Z- i-e.docx
 

Dernier

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Dernier (20)

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 

Using the class example database (SQLFUN)- create the required SQL sta.docx

  • 1. Using the class example database (SQLFUN), create the required SQL statements to produce the following results: add a new food to the L_foods table from a new supplier, add Fresh Salmon as menu-item 11, The supplier_id is CFF, The product_code is SA, the price is $8.25, there is no price_increase value. Step 1: Add CFF to the L_supplier table(the name of this supplier is Cathy's Fresh Fish). Step 2: In oracle or mySQL, make these two inserts in a single transaction. Solution Using transaction, we can make two insert statements into single transaction. START TRANSACTION; INSERT INTO L_Supplier (supplier_id, name) VALUES ('CFF', 'Cathy's Fesh Fish'); INSERT INTO L_foods (id, supplier_id, menu_item, product_code, price) VALUES (1, 'CFF', 11, 'SA', 8.25); COMMIT;