当前位置:网站首页>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_name
3, View the database and all tables in the database
// view the database
show database
// View all tables in the current database
show tables
4, Select database
use databas
Two , 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 */
边栏推荐
- 网络安全-钓鱼
- [understanding of opportunity -36]: Guiguzi - flying clamp chapter - prevention against killing and bait
- STM32 - GPIO input / output mode
- Types of map key and object key
- Vant implements a simple login registration module and a personal user center
- [camera topic] turn a drive to light up the camera
- SSL flood attack of DDoS attack
- [QT] encapsulation of custom controls
- NCTF 2018 part Title WP (1)
- 【数据挖掘】任务5:K-means/DBSCAN聚类:双层正方形
猜你喜欢
Some functions of applet development
网络安全-漏洞与木马
High-Resolution Network (篇一):原理刨析
PS去除水印详解
Network security - vulnerabilities and Trojans
High resolution network (Part 1): Principle Analysis
C application interface development foundation - form control (1) - form form
【数据挖掘】任务2:医学数据库MIMIC-III数据处理
Learn the five skills you need to master in cloud computing application development
Why can't the start method be called repeatedly? But the run method can?
随机推荐
Network security - Trojan horse
Related concepts of GDB in embedded system
One of the C language practical projects is greedy snake
[camera topic] how to save OTP data in user-defined nodes
How to refresh the opening amount of Oracle ERP
[AUTOSAR cantp] -2.11-uds diagnostic response frame data segment data padding data filling and data optimization data optimization (Theory + configuration)
JUC thread scheduling
网络安全-病毒
Network security - password cracking
Network security ACL access control list
Network security - man in the middle attack
"Jetpack - livedata parsing"
Smart management of Green Cities: Digital twin underground integrated pipe gallery platform
The testing process that software testers should know
Introduction to flask tutorial
2022-02-15 reading the meta module inspiration of the influxdb cluster
Reprint some Qt development experience written by great Xia 6.5
C language course information management system
[error record] an error is reported in the fluent interface (no mediaquery widget ancestor found. | scaffold widgets require a mediaquery)
NCTF 2018 part Title WP (1)