SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table tbl_veggie ( orderid int not null auto_increment primary key, customerID int not null, name varchar (200), PerPiece decimal (10,5), total_order INT, price decimal (10,4), date_purchased date ); Insert into tbl_veggie (customerID, name, PerPiece, total_order, price, date_purchased) VALUES ('2','Cabbage ','10.5','3','30.15','2022-03-26'), ('4','Eggplant ','30.10','4','120.40','2022-03-24'), ('6','Bitter Gourd ','20.10','2','40.20','2022-03-06'), ('8','Brocolli ','25.50','1','25.50','2022-04-08'), ('12','Caulliflower ','50.10','2','100.20','2022-01-14'); Select * from tbl_veggie; Select lower(name) as Lowercase_veggie, upper(name) as Uppercase_veggie from tbl_veggie; Select rtrim(name) as veggie from tbl_veggie; Select substring_index(date_purchased, -, 1) from tbl_veggie; create table tbl_Netflix_Movie ( Netflix_ID int not null auto_increment PRIMARY key, Netflix_Title VARCHAR (150), Netflix_Director VARCHAR (150), Netflix_Genre VARCHAR (150), Netflix_Ratings DECIMAL(12,4), Netflix_Date DATE ); Insert into tbl_Netflix_Movie (Netflix_Title, Netflix_Director, Netflix_Genre, Netflix_Ratings, Netflix_Date) Values ('Black Crab','Adam Berg', 'Action','5.7','2022-03-18'), ('Mission:Impossible-Fallout', 'Christopher McQuarrie', 'Spies', '8.0', '2018-07-18'), ('Oblivion', 'Joseph Kosinski', 'Science Fiction', '7.0','2013-04-18'), ('The Adam Project', 'Shawn Levy', 'Science Fiction','6.8','2022-03-11'), ('Rescued by Ruby', 'Katt Shea', 'Drama', '6.8','2022-03-17'), ('Windfall', 'Charlie McDowell', 'Crime', '5.8', '2022-03-18'), ('The Unholy', 'Evan Spiliotopoulos', 'Horror', '5.0', '2021-03-31'), ('The Dictator', 'Larry Charles', 'Comedy', '6.5', '2012-05-12'), ('Without Saying Goodbye', 'Bruno Ascenzo', 'RomCom', '5.7', '2022-03-18'), ('In Good Hands', 'Ketche', 'Comedy', '5.0', '2022-03-21'); Select * from tbl_Netflix_Movie; Select lower(Netflix_Title) as Lowercase_Title, upper(Netflix_Director) as Uppercase_Director from tbl_Netflix_Movie
Stuck with a problem? Got Error? Ask ChatGPT!
Copy Clear