当前位置:网站首页>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 */
边栏推荐
- High resolution network (Part 1): Principle Analysis
- [error record] navigator operation requested with a context that does not include a naviga
- Cloud native topic sorting (to be updated)
- [shutter] animation animation (basic process of shutter animation | create animation controller | create animation | set value listener | set state listener | use animation values in layout | animatio
- Pytest learning notes (12) -allure feature · @allure Step () and allure attach
- Performance test | script template sorting, tool sorting and result analysis
- Sweet talk generator, regular greeting email machine... Open source programmers pay too much for this Valentine's day
- [technology development-23]: application of DSP in future converged networks
- 网络安全-破解系统密码
- [data mining] task 2: mimic-iii data processing of medical database
猜你喜欢

NCTF 2018 part Title WP (1)

A 30-year-old software tester, who has been unemployed for 4 months, is confused and doesn't know what to do?

¢ growth path and experience sharing of getting an offer

Query product cases - page rendering data

Learn the five skills you need to master in cloud computing application development

Take you ten days to easily complete the go micro service series (II)

Main features of transport layer TCP and TCP connection
![[data mining] task 3: decision tree classification](/img/9a/1cb2a8a90f16e7bfa9b48e516a966c.png)
[data mining] task 3: decision tree classification

【数据挖掘】任务4:20Newsgroups聚类

ByteDance data Lake integration practice based on Hudi
随机推荐
[error record] navigator operation requested with a context that does not include a naviga
Vant implements a simple login registration module and a personal user center
One of the C language practical projects is greedy snake
[data mining] task 6: DBSCAN clustering
小程序开发黑马购物商城中遇到的问题
Network security - firewall
Smart management of Green Cities: Digital twin underground integrated pipe gallery platform
Performance test | script template sorting, tool sorting and result analysis
Smart management of Green Cities: Digital twin underground integrated pipe gallery platform
GDB 在嵌入式中的相关概念
网络安全-openvas
JUC thread scheduling
"Jetpack - livedata parsing"
【数据挖掘】任务2:医学数据库MIMIC-III数据处理
Caused by: com. fasterxml. jackson. databind. exc.MismatchedInputException: Cannot construct instance o
Network security - cracking system passwords
SSL flood attack of DDoS attack
[technology development-23]: application of DSP in future converged networks
Technology sharing | Frida's powerful ability to realize hook functions
In the face of difficult SQL requirements, HQL is not afraid