insert into employee(id, workno, name, gender, age, idcard) values (1,'1','Itcast','男',10,'123456789012345678');
select * from employee;
insert into employee values (2,'2','喜洋洋','男',18,'123456781212345678');
insert into employee values (3,'3','熊大','男',38,'123453489012345678'),(4,'4','光头强','男',44,'123456219012345678');
DML-修改数据
-- 修改id为1的数据, 将name修改为itheim
update employee set name = 'itheim' where id = 1;
-- 修改id为1的数据, 将name修改为小红 , gender 修改为女
update employee set name = '小红' , gender = '女' where id = 1;
DML-删除数据
-- 删除 gender 为女的员工
delete from employee where gender = '女';
-- 删除所有员工
delete from employee;
一、日期时间数据
1.QTime 用于存储和操作时间数据的类,其中包括小时(h)、分钟(m)、秒(s)、毫秒(ms)。函数定义如下:
//注:秒(s)和毫秒(ms)有默认值0
QTime::QTime(int h, int m, int s 0, int ms 0) 若无须初始化时间数据,可…