当前位置: 首页> 文旅> 美景 > 东莞网络问政平台_上海外贸50强企业_免费引流推广的方法_天津外贸seo推广

东莞网络问政平台_上海外贸50强企业_免费引流推广的方法_天津外贸seo推广

时间:2025/7/9 13:20:44来源:https://blog.csdn.net/Katherine1029/article/details/144317952 浏览次数:0次
东莞网络问政平台_上海外贸50强企业_免费引流推广的方法_天津外贸seo推广

drop database if exists school;
create database school default charset utf8;
-- 切换到数据库school
use school;
-- 创建学生表
drop table if exists tb_student;

create table tb_student
(
stuid int not null comment '学号',
stuname varchar(20) not null comment '姓名',
stusex bit default 1 comment '性别',
stubirth date comment '生日', 
primary key (stuid)
);
alter table tb_student add column stuaddr varchar(255);
alter table tb_student change column stuaddr stuaddr varchar(511);
-- alter table tb_student drop column stuaddr;
insert into tb_student values(1003, '张三丰',1,'1982-2-2','湖北十堰');
insert into tb_student values(1004, '张二丰',1,'1982-2-2','湖北十堰');
insert into tb_student values(1005, '张一丰',1,'1982-2-2','湖北十堰');
insert into tb_student (stuid,stuname,stusex) values (1006,'素素',0);
insert into tb_student (stuid,stuname,stusex) 
    values
        (1007,'杨逍',1),
        (1008,'谢逊',1),
        (1009,'杨不悔',0);
        
-- 截断表
-- truncate table tb_student-- 

-- 删除学生delete
delete from tb_student where stuid=1003;

--这是因为 MySql 运行在 safe-updates模式下,该模式会导致非主键条件下无法执行update或者delete命令,执行如下命令:
set sql_safe_updates=0;
delete from tb_student where stusex=0;

关键字:东莞网络问政平台_上海外贸50强企业_免费引流推广的方法_天津外贸seo推广

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: