当前位置:网站首页>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 */
边栏推荐
- [QT] encapsulation of custom controls
- Problems encountered in small program development of dark horse shopping mall
- 7-25 read numbers (loop switch)
- JUC thread scheduling
- Network security - Trojan horse
- The thread reuse problem of PageHelper using ThreadLocal, did you use it correctly?
- Processing of tree structure data
- Certaines fonctionnalités du développement d'applets
- [data mining] task 6: DBSCAN clustering
- [leetcode] 797 and 1189 (basis of graph theory)
猜你喜欢

Rockchip3399 start auto load driver

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

传输层 TCP主要特点和TCP连接

LeetCode 987. Vertical order transverse of a binary tree - Binary Tree Series Question 7

ByteDance data Lake integration practice based on Hudi

A simple tool for analyzing fgui dependencies

Why is it not recommended to use BeanUtils in production?

Tâche 6: regroupement DBSCAN

What are the differences between software testers with a monthly salary of 7K and 25K? Leaders look up to you when they master it

His experience in choosing a startup company or a big Internet company may give you some inspiration
随机推荐
Virtual list
2022-02-15 reading the meta module inspiration of the influxdb cluster
Network security - vulnerabilities and Trojans
Network security - talking about security threats
Caused by: com. fasterxml. jackson. databind. exc.MismatchedInputException: Cannot construct instance o
[technology development-23]: application of DSP in future converged networks
Introduction to kotlin collaboration
Qtablewidget lazy load remaining memory, no card!
His experience in choosing a startup company or a big Internet company may give you some inspiration
Pytest learning notes (12) -allure feature · @allure Step () and allure attach
One of the C language practical projects is greedy snake
自定义组件、使用npm包、全局数据共享、分包
网络安全-NAT网络地址转换
Openresty cache
[data mining] task 6: DBSCAN clustering
Reprint some Qt development experience written by great Xia 6.5
网络安全-扫描
Network security - scan
Summary of interval knowledge
转载收录6.5大侠写的部分Qt开发经验