IDEA运行MySQL(谢谢,已经删除Sqlyog了)

找到一切高效的方法和工具。

一些还原语句和展示方式。

 

数据库的创建&列结构的增删改查

create database if not exists new_School_System;
  create table if not exists `college_Student`(

    `S_id`      int(4)      not     null auto_increment comment '学号',
    `S_name`    varchar(50) default null                comment '姓名',
    `S_age`     int(3)      default null                comment '年龄',
    `S_sex`     varchar(2)  default null                comment '性别',
    `S_score`   int(3)      default null                comment '分数',
    `S_email`   varchar(30) default null                comment '邮箱',
    `S_addres`  varchar(50) default null                comment '地址',
    `S_party`   varchar(20) default null                comment '党派',

    primary key (`S_id`)
  );
# 源码
  show create table college_Student;
#  展示表
  desc college_Student;
# 表的操作界面
  select * from college_Student;
# 增
  alter table college_Student add column `S_psw` varchar(30) after `S_name`;
# 删(库
  drop database if exists `new_School_System`;
# 删(表
  drop table if exists college_Student;
# 删(列
  alter table college_Student drop `S_party`;
  alter table college_Student add column `S_party` varchar(20) after `S_name`;
# 改(变量属性
  alter table college_Student modify `S_age` varchar(3);
# 改(变量名字
  alter table college_Student change `S_party` `S_dogShit` varchar(20);
# 查
  select * from college_Student;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值