Home > Database > Mysql Tutorial > Example analysis of common MySQL commands

Example analysis of common MySQL commands

王林
Release: 2023-05-26 19:49:04
forward
1538 people have browsed it

1. View all current databases

show databases;
Copy after login

2. Open the specified library use library name

3. View all tables of the current library

show tables;
Copy after login

4. View All tables in other libraries

show tables from 库名;
Copy after login

5. Create table

create table 表名(  
列名 列类型,    
列名 列类型,    
。。。
);
Copy after login

6. View table structure

desc 表名;
Copy after login

7. View server version

Method 1: Log in to the mysql server select version();

Method 2: Not logged in to the mysql server mysql --version or mysql --V

The above is the detailed content of Example analysis of common MySQL commands. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template