Challenge: Using INSERT
メニューを表示するにはスワイプしてください
In the last task, we created a table that stores the products of a grocery store. They contact you again to fix the previous table making sure that the id of each item in the products table is unique. They also want you to insert the following data into the table:
object[,] groceryItemsData = new object[,]
{
{ "Bananas", "Fruits", 0.99f, 150 },
{ "Apples", "Fruits", 1.49f, 100 },
{ "Carrots", "Vegetables", 0.79f, 200 },
{ "Potatoes", "Vegetables", 1.29f, 180 },
{ "Milk", "Dairy", 2.49f, 80 },
{ "Eggs", "Dairy", 1.99f, 120 },
{ "Bread", "Bakery", 1.99f, 90 },
{ "Chicken", "Meat", 4.99f, 50 },
{ "Rice", "Grains", 3.99f, 120 },
{ "Pasta", "Grains", 1.49f, 150 }
};
Your task is to:
- Create a new table called
storeand, this time, make theidcolumn a primary key and set it to automatically increment; - Insert the data given in the
groceryItemsDataarray into the new table.
すべて明確でしたか?
フィードバックありがとうございます!
セクション 1. 章 32
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください
セクション 1. 章 32