TEMA

Why do I keep getting Runtime Exception for this?

loliveira124 preguntado 4 years ago

UPDATE products SET price = 20.0 WHERE type = "A";

UPDATE products SET price = 70.0 WHERE type = "B";

UPDATE products SET price = 530.5 WHERE type = "C";

SELECT name, type FROM products ORDER BY type ASC, id DESC;

Recuerda no enviar soluciones. Tu mensaje puede ser revisado por nuestros moderadores.

  • hcosta13 respondido 3 years ago

    The 'UPDATE' command it is classified as DML - Data Manipulation Language. This type os language is used to manipulate the data inside the tables and it is used by the DM - DataManager.

    The commands that we are allowed to use here are classified as DQL - Data Query Language. Thats the language used to query data. An example it is the command 'SELECT'.

    With those commands you are trying to access the database of this question from the Uri Judge servers, so... you can't. And it would be just too ease to change the values of the table.

  • RaphaelKonichi respondido 4 years ago

    You should only use a SELECT statement. Do not use UPDATE.