CREATE DATABASE shop;
USE shop;
CREATE TABLE products (
id AUTO_INCREMENT,
name text,
price decimal,
category text,
PRIMARY KEY (id)
);
INSERT INTO products VALUES ("Banana", 25.2, "food"), ("Apple", 2.1, "food");
UPDATE products SET price = 30 WHERE ID = 1;
SELECT * FROM products;
ALTER TABLE products RENAME products_new;
DROP TABLE products_new;
Comments
Dear visitor, Do you have any errors in the output?
please can you provide the out put screenshot for the above answer
Leave a comment