Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the commonly used mysql commands in linux environment

2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the relevant knowledge of "what are the mysql commands commonly used in the linux environment?" in the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Enter the mysql command:

Mysql-u + (user name)-p + (password) mysql statement command must be followed by ";"

Query the library name:

Show databases

Modify the library:

Use library name

Create a library:

Create database [if not exists] [Library name]

Query creation library:

Show create database [library name]

Query creation table:

Show create table [table name]

Query table:

Desc [table name]

Query the libraries currently in use:

Select database ()

Create a table:

Create table [if not exists] Table name (attribute)

Delete the library:

Drop databse [library name]

Delete the table:

Drop table [table name] for example: create table student (int id (length) (extra attribute), name varchar (length)); the default length of int type in the database is 11 varchar. Error will be reported if length is not given.

Not empty:

Not null

Self-increasing:

Auto_increment

Primary key:

Primary key (attribute name) attributes are separated by ","

Character set:

Charset [type]

Storage engine:

This is the end of engin's "what are the mysql commands commonly used in the linux environment?" Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report