0

How should I store the data in the screenshot in a MySQL table? It's pretty much a matrix or a 2d Array. Just looking for the exact SQL statement(s) to use to store and retrieve this data and what that should look like on the database side.

         1          2         3
Liner    6          6         6
Rod      0          0         0
Stk      8.5        9.5       12
Eff      95         98        97
Stroke   0          0         59
Disp     0.0706     0.0709    0.0997
-- How to do a 2D array like this on the database side?
-- 1
-- 2
-- 3
-- 4
-- All columns from 2D array:
CREATE TABLE DAILY_MUD_REPORT (
liner  INT,
rod INT,
stk DECIMAL(25, 4),
eff INT,
stroke INT,
disp DECIMAL(25, 4));

My initial thoughts are just to store each row as a column. Is that how to do this? I am just trying to figure out how to store this in a MySQL database.

YoYoYo
  • 17
  • 1
  • 7
  • How did you try to store this info? Did you try anything ? – Luuk Nov 22 '22 at 19:54
  • Does this answer your question? [Can I store images in MySQL](https://stackoverflow.com/questions/6472233/can-i-store-images-in-mysql) – Luuk Nov 22 '22 at 19:56
  • I'm not looking to store the image of the data. I am looking to store the data itself from this format into SQL tables. – YoYoYo Nov 22 '22 at 20:03
  • Never post screenshots of your data here. Confusion like this is only one of several failure modes. _formatted text_ will give you much better results. Images will just get you downvotes and a question that is closed or ignored. – Joel Coehoorn Nov 22 '22 at 20:30

0 Answers0