Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

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

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige

Hier ansehen

1 von 1 Anzeige

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

Herunterladen, um offline zu lesen

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;
.

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;
.

Anzeige
Anzeige

Weitere Verwandte Inhalte

Weitere von rtodd575 (20)

Aktuellste (20)

Anzeige

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

  1. 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;

×