0

I am trying to play around with Hypertable on my windows pc's command prompt. I am able to create a table and insert the values

CREATE TABLE fruits (color, energy, vitamins);

INSERT INTO fruits VALUES ("apple", "color", "red"),
("apple", "energy", "207KJ"),
("apple", "vitamins:C", "15mg);

However when I attempt to alter/change the value of 15mg to 13mg, I couldn't find resources online that works to alter my values in my table. Can anyone be so kind as to help out?

ALTER TABLE fruits MODIFY (vitamins) ...

That's all I've got.

LSY.E
  • 5
  • 7

1 Answers1

0

To update value of existing record, you should use update keyword.

UPDATE fruits SET vitamins = "13mg" WHERE color = "apple"

"alter table" is used to add, delete, or modify columns in an existing table.

sovas
  • 1,508
  • 11
  • 23
  • however one thing i dont understand from learning with the existing resources online, the color of apple is red, i dont really understand how it works really, as it is so much weirder compare to SQL... btw that line doesnt work for me. – LSY.E Jun 23 '17 at 07:59