当前位置:网站首页>An important term in MySQL -- CRUD
An important term in MySQL -- CRUD
2022-06-28 06:58:00 【Xiaobinbin &】
mysql Database operation , It mainly performs a series of operations on the files in the database , abbreviation CRUD, The following is a list of commonly used CRUD Instructions
C:create establish
Create database :create database Library name
Create table : create table Table name ( Field attribute .....)
Create foreign keys :alter table The name of this table constraint Foreign key name foreign key Fields in this table references Table name ( Field );
Create index :create index Index name on Table name ( Field )
R :retrive check ( retrieval )
Check all databases :show databases;
Check the number of tables in the database :show tables;
Field format in lookup table : desc Library name
Look up the complete format of the fields in the table :show full fields from Table name
Look up the field definition format in the table : show create table Table name
Look at the data in the table select * from Table name
U: update modify , to update
Modify the data in the table :update table Table name set Field = value where Conditions
Add fields alter table Table name add Field attribute ;
Modifying the properties of fields in a table : alter table Table name modify Field name attribute
Modify the names and attributes of fields in the table : alter table Table name change Old field name , new field name attribute
D:delete
Delete database : drop database Library name
Delete table : drop table Table name
Delete data :delete table Table name where Conditions
truncat table Table name
Delete foreign key :alter table Table name drop foreign key Foreign key name
Delete index :alter table Table name drop index Index name
边栏推荐
猜你喜欢

Linux MySQL implements root user login without password

Integer promotion and size side byte order

The code is correct, and the rendering page does not display the reason

pytorch RNN 学习笔记

Batch import of pictures into WPS table by date

fpm工具安装

声网 VQA:将实时互动中未知的视频画质用户主观体验变可知

Libuv框架echo-server.c源码详解(TCP部分)

Exception handling (I) -- null pointer and array index out of bounds

语音增强-频谱映射
随机推荐
Rust FFI 编程 - libc crate
BACnet/IP网关如何采集楼宇集中控制系统数据
VM332 WAService.js:2 Error: _vm.changeTabs is not a function报错
Puge -- singleton mode
Freeswitch uses origin to dialplan
freeswitch设置最大呼叫时长
2 startup, interrupt and system call
Is it safe to open a stock trading account on your mobile phone?
Iphone6plus enters the list of antique products netizen: I'm still using it
最后的二十九天
File header information cross reference table
Niubi 666, this project makes web page making as simple as building blocks
【网络教程】IPtables官方教程--学习笔记1
[c #] [reprint]furion frame address and tutorial address
[rust translation] implement rust asynchronous actuator from scratch
Techo Day 腾讯技术开放日,6月28日线上等你!
微信小程序分页功能,下拉刷新功能,直接干货拿来就用
Linked list (I) - remove linked list elements
Freeswitch使用originate转dialplan
自律挑战30天