编辑代码

CREATE DATABASE pets;
use pets;
create table pets_info(
id int,
namee varchar(32)primary key,
weightt varchar(32),
height varchar(32),
typee varchar(32),
age int,
color varchar(32)
);
insert into pets_info(namee,weightt,height,typee,age,color)
values('mike',3,28,'吉娃娃',10,'白');
INSERT INTO pets_info(namee,weightt,height,typee,age,color)
values('sala',6.5,40,'柴犬',15,'黄');
INSERT INTO pets_info(namee,weightt,height,typee,age,color)
values('黑狮',21.5,45,'藏獒',26,'黑');
INSERT INTO pets_info(namee,weightt,height,typee,age,color)
values('大圣',15,42,'牧羊犬',20,'黄');
INSERT INTO pets_info(namee,weightt,height,typee,age,color)
values('boy',5.5,24,'蝴蝶犬',6,'白');
select namee,typee from pets_info
where color='白';
select*from pets_info
where weightt<10 and height<30;
update pets_info set height=26.5 where namee='boy';
delete from pets_info where namee='牧羊犬'