CREATE TABLE `supermarket`.`mahsulot2` ( `id` INT(30) NOT NULL AUTO_INCREMENT , `nomi`VARCHAR(30) NOT NULL , `narx` INT(50) NOT NULL , `keltirilgan_sana` DATE NOT NULL ,`miqdor` INT(30) NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;
INSERT INTO `mahsulot2` (`id`, `nomi`, `narxi`, `keltirilgan_sana`, `miqdor`) VALUES(NULL, 'Olma', '12000', '2020-11-06', '300'), (NULL, 'Qovun', '30000', '2020-11-02','140'), (NULL, 'Tarvuz', '13000', '2020-11-06', '230'), (NULL, 'Kartoshka', '8000', '2020-11-03', '150'), (NULL, 'Karam', '3000', '2020-11-10', '50'), (NULL, 'Shirinliklar','57000', '2020-11-10', '320')
SELECT * FROM `mahsulot1` UNION SELECT * FROM mahsulot2 ORDER BY id
Do'stlaringiz bilan baham: |