当前位置:网站首页>mysql black window ~ build database and build table
mysql black window ~ build database and build table
2022-07-31 15:20:00 【Life is so hard】
//Create a database
create database tablename;
For example create database drop_testdb;
//Show all data
show databases;
As follows:
// drop database
drop database
// View data in table
select * from `test`;
// Display the selected field content
SELECT `id`, `name` FROM `test` WHERE 1
// create a database
create database drop_database;
// Use the database
use drop_database;
// Show all tables in the database
show tables;
// if exists determine whether the database exists, no error will be generated
drop database if exists drop_database;
Create data table
create table user(
id int primary key auto_increment,
username varchar(20) not null default ' ',
passwd char(32) not null default ' ',
email varchar(50) not null default ' ',
gender char(1) not null default ' ',
age tinyint unsigned not null default 0
)enginemyisam charset utf8
// drop table
drop table table_name;
//Add data to the test table
INSERT INTO `test`(`id`, `name`) VALUES ('1','Li Si');
// View data in table
select * from `test`;
// Modify the data in the table
UPDATE `test` SET `id`='This is the modified id', `name`='This is the modified content'WHERE `id`=1;
// delete data from table
DELETE FROM `test` WHERE 1
//Add a field to a table
alter table user add email varchar(50) not null default ' ' after passwd;
// Set display character set
set names gbk;
边栏推荐
- Excel quickly aligns the middle name of the table (two-word name and three-word name alignment)
- 435. 无重叠区间
- 工程水文学试卷
- 数据库的范式(第一范式,第二范式,第三范式,BCNF范式)「建议收藏」
- mysql黑窗口~建库建表
- OpenCV测量物体的尺寸技能 get~
- The R language ggstatsplot package ggbarstats function visualizes bar charts, and adds hypothesis test results (including sample number, statistics, effect size and its confidence interval, significan
- abaqus find contact pairs报错:surface name is already in use
- 安装Xshell并使用其进行Ymodem协议的串口传输
- 乡村基冲刺港交所:5个月期内亏2224万 SIG与红杉中国是股东
猜你喜欢
Grafana安装后web打开报错
三、数组
微信聊天记录中搜索红包
Getting started with UnityShader (3) - Unity's Shader
TextBlock控件入门基础工具使用用法,取上法入门
Ubantu专题5:设置静态ip地址
AVH Deployment Practice (1) | Deploying the Flying Paddle Model on Arm Virtual Hardware
自适应控制——仿真实验三 用超稳定性理论设计模型参考自适应系统
Why is the field of hacking almost filled with boys?
Why don't you make a confession during the graduation season?
随机推荐
贪吃蛇项目(简单)
Web自动化实战——Selenium4(自动化测试环境的搭建)
「秋招系列」MySQL面试核心25问(附答案)
border控件的使用
7. Summary of common interview questions
力扣:714. 买卖股票的最佳时机含手续费
org.apache.jasperException(could not initialize class org)
01 邂逅typescript,环境搭建
TRACE32 - Common Operations
abaqus find contact pairs报错:surface name is already in use
国内市场上的BI软件,到底有啥区别
The use of button controls
力扣:738.单调递增的数字
Ubantu专题4:xshell、xftp连接接虚拟机以及设置xshell复制粘贴快捷键
做事软件开发-法的重要性所在以及合理结论的认识
四象限时间管理有多好用?
The normal form of the database (first normal form, second normal form, third normal form, BCNF normal form) "recommended collection"
Advanced Mathematics - Commonly Used Indefinite Integral Formulas
分成两栏后文字顺序混乱的问题解决【写期刊论文时】
11 pinia use