当前位置:网站首页>DDL basic operation
DDL basic operation
2022-07-03 01:51:00 【Xu Feng &】
title :
(1) Create database , Delete database , View the database and all tables in the database , Select the database table and select all
(2) Create database tables
One , database
1, Create database
create database [if not exists] database-name
// Brackets indicate whether to add or not 2, Delete database
drop database database_name3, View the database and all tables in the database
// view the database
show database
// View all tables in the current database
show tables4, Select database
use databasTwo , Create database tables
create table table_name(
column_name data_type[not null][default default_value][auto_increment][],
...
[primary key(pk_name),]
[foreign key(fk_name) references referenced_table_name(ref_pk_name)]
)
/* Syntax description
table_name: Table name
column_name: Field name
data_type: Field data type
default_value: The default value is
auto_increment: Primary key auto growth
pk_name: The primary key name in the current table
fk_name: Key names in the current table
referenced_table_name: The application shows that ( Primary key name )
ref_pk_name: The name of the main key of the applied table */
边栏推荐
- GDB 在嵌入式中的相关概念
- One of the C language practical projects is greedy snake
- 网络安全-病毒
- Telecom Customer Churn Prediction challenge
- 疫情當頭,作為Leader如何進行團隊的管理?| 社區征文
- Network security - scanning and password explosion 2
- 传输层 TCP主要特点和TCP连接
- Everything文件搜索工具
- 小程序开发黑马购物商城中遇到的问题
- Why can't the start method be called repeatedly? But the run method can?
猜你喜欢
![[error record] navigator operation requested with a context that does not include a naviga](/img/53/e28718970a2f7226ed53afa27f6725.jpg)
[error record] navigator operation requested with a context that does not include a naviga
![[QT] encapsulation of custom controls](/img/33/aa2ef625d1e51e945571c116a1f1a9.png)
[QT] encapsulation of custom controls

Main features of transport layer TCP and TCP connection

深度(穿透)选择器 ::v-deep/deep/及 > > >

Everything file search tool
![[data mining] task 6: DBSCAN clustering](/img/af/ad7aa523b09884eee967c6773a613f.png)
[data mining] task 6: DBSCAN clustering

"Jetpack - livedata parsing"

Technology sharing | Frida's powerful ability to realize hook functions
![[Appendix 6 Application of reflection] Application of reflection: dynamic agent](/img/e7/0ee42902b178b13e9a41385267e7b6.jpg)
[Appendix 6 Application of reflection] Application of reflection: dynamic agent

【数据挖掘】任务4:20Newsgroups聚类
随机推荐
The thread reuse problem of PageHelper using ThreadLocal, did you use it correctly?
【Camera专题】OTP数据如何保存在自定义节点中
7-25 read numbers (loop switch)
Summary of interval knowledge
[QT] encapsulation of custom controls
Why is it not recommended to use BeanUtils in production?
云原生题目整理(待更新)
网络安全-扫描
网络安全-钓鱼
Network security - scanning and password explosion 2
High resolution network (Part 1): Principle Analysis
ByteDance data Lake integration practice based on Hudi
A 30-year-old software tester, who has been unemployed for 4 months, is confused and doesn't know what to do?
In the face of difficult SQL requirements, HQL is not afraid
[error record] an error is reported in the fluent interface (no mediaquery widget ancestor found. | scaffold widgets require a mediaquery)
Leetcode skimming questions_ Sum of two numbers II - enter an ordered array
Main features of transport layer TCP and TCP connection
网络安全-最简单的病毒
"Jetpack - livedata parsing"
String splicing function of MySQL