Home > database >  Beginners SQL how to add a column, the data in the table for another with corresponding numerical ID
Beginners SQL how to add a column, the data in the table for another with corresponding numerical ID

Time:05-01

Sqlite files, there are two table, the table is A commodity transaction details, but only the order no. (only), product ID (such as A total of five kinds of commodity, the ids is 0 to 4) and quantity, etc., this table does not give goods price, while another form B gives the ID corresponding to the details of the goods, include the name of the unit price and etc.,
I now want to add a new column in the first table, make the data within a column for the amount of the goods,
Such as the original table the first line, the order ID is 0001, sales of the commodity ID is 3, and from table B ID for 3 RMB 20 is the goods amount, I want to make the newly added column directly display RMB 20, excuse me how to operate?
  • Related