Get the App
SLTechnology News&Howtos  ›  Servers  › 

Cloud computing learning route source framework notes: Mysql source code three

Shulou Source: shulou.com Published: 2022-06-02 14:09:32 09月28日 Update

The following is the notes on the cloud computing learning route source framework, and the following is about the third part of the Mysql source code:

Table operation

Create a tabl

Mysql > create tables table name (field type (modifier))

View tabl

View all tables: mysql > show tables

View table records: mysql > show table status like 'table name'

View the table structure: mysql > desc 'table name'

View table records: mysql > select * from 'table name' limit 10

Modify the table

Modify the table name: mysql > rename table 'source table name' to 'new table name

Field record operation

Field

Add field: mysql > alter table 'table name' add 'field' 'modifier'

Delete field: mysql > alter table 'table name' drop 'field'

Modify fields: mysql > alter table 'table name' change 'old field' new field''modifier'

Record

Add record: insert into 'table name (record, record)' values (), (), ()

: insert into 'table name' values (), (), ()

Modify record: update 'table name' set field =''where field =''

Delete record: delete from 'table name' where 'word

Tags: Fields content source code frames notes routes learning types structures Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Xiaomi Huawei NVidia MySQL