惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

腾讯CDC
Schneier on Security
Schneier on Security
B
Blog RSS Feed
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
A
About on SuperTechFans
Recorded Future
Recorded Future
Recent Announcements
Recent Announcements
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
Hugging Face - Blog
Hugging Face - Blog
The GitHub Blog
The GitHub Blog
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MyScale Blog
MyScale Blog
V2EX - 技术
V2EX - 技术
N
Netflix TechBlog - Medium
F
Fortinet All Blogs
V
Visual Studio Blog
Martin Fowler
Martin Fowler
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
The Exploit Database - CXSecurity.com
F
Full Disclosure
Scott Helme
Scott Helme
H
Heimdal Security Blog
博客园 - 叶小钗
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
Application and Cybersecurity Blog
Application and Cybersecurity Blog
V
Vulnerabilities – Threatpost
Blog — PlanetScale
Blog — PlanetScale
Security Latest
Security Latest
WordPress大学
WordPress大学
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Troy Hunt's Blog
S
SegmentFault 最新的问题
Forbes - Security
Forbes - Security
Jina AI
Jina AI
S
Securelist
小众软件
小众软件
Simon Willison's Weblog
Simon Willison's Weblog
J
Java Code Geeks
AWS News Blog
AWS News Blog
N
News and Events Feed by Topic
博客园 - 三生石上(FineUI控件)
量子位

博客园 - Augur

又开始使用,学习 Integer和int Mybatis的学习1 初次安装与错误排除 知乎的 Java开发中的23种设计模式(转) vo与po entityVo对象与entity对象 dao 网上Java总结 dto vo html css col-md-offset VUE - 相对路径 转:防止跨站攻击,安全过滤 Java中的包装数据类型 一些名词 数据表 键值定义 楚乔传 Princess Agents Java学习08 (第一遍) - SpringMVC
mysql 表结构
Augur · 2017-07-26 · via 博客园 - Augur

1.登录数据库
>mysql -u root -p 数据库名称

2.查询所有数据表
>show tables;

3.查询表的字段信息
>desc 表名称;

4.1添加表字段

alter table table1 add transactor varchar(10) not Null;

alter table   table1 add id int unsigned not Null auto_increment primary key

4.2.修改某个表的字段类型及指定为空或非空
>alter table 表名称 change 字段名称 字段名称 字段类型 [是否允许非空];
>alter table 表名称 modify 字段名称 字段类型 [是否允许非空];

>alter table 表名称 modify 字段名称 字段类型 [是否允许非空];

4.3.修改某个表的字段名称及指定为空或非空
>alter table 表名称 change 字段原名称 字段新名称 字段类型 [是否允许非空

4.4如果要删除某一字段,可用命令:ALTER TABLE mytable DROP 字段 名;

建表:

DROP TABLE IF EXISTS bulletin;

CREATE TABLE bulletin(
 id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,             # 主键
 uid INT(11) NOT NULL DEFAULT 0,    # 创建者id
 context VARCHAR(600) NOT NULL DEFAULT '',  # 公告详细内容(300字)
 begintime DEC(20) NOT NULL DEFAULT 0,   # 公告开始时间
 endtime DEC(20) NOT NULL DEFAULT 0,   # 公告结束时间
 createtime DEC(20) NOT NULL DEFAULT 0,   # 创建时间
 modifytime DEC(20) NOT NULL DEFAULT 0   # 修改时间

 PRIMARY KEY (`Id`),
)DEFAULT CHARSET=UTF8 TYPE=INNODB;