MySQL has a lot of basic commands, and the show command is also one of them. in many users, the use of the show command is also prone to confusion. This article summarizes the many usage of the show command. A. showtables or
Mysql calculates how many data entries in the database bitsCN.com
Today I reviewed some simple MySQL statements, which can be summarized as follows:
Number of mysql statistical tables: select count (1) FROM information_schema.TABLES WHERE
MySQL is an open-source relational database management system (RDBMS). the MySQL database system uses the most common database management language-Structured Query Language (SQL) for database management. Next, I will introduce to you through this
1) should not use the same code to not garbled it?In addition, the database encoding is latin1 does not support Chinese? Why can I display Chinese here?
2) There is a point not understand is: I use set names UTF8, Chinese will be garbled;After using
This document describes how to use the show command in a MySQL database:
A. Show tables or show tables from database_name; -- displays the names of all tables in the current database.
B. Show databases; -- display the names of all databases in
Add or modify the following in my. CNF:Code:[Client]Default-character-set = utf8[Mysqld]Default-character-set = utf8
We recommend that the encoding on the webpage be consistent with the encoding on the database. If both are utf8, set them to utf8.
Obtain database and table information:
Mysql> connect;
Mysql> show databases;
Mysql> show tables;
Mysql> show tables from db_name;
Mysql> show columns from tbl_name;
Mysql> show index from tbl_name;
Mysql> show table status;
Mysql> show
Although the architecture of MySQL and Oracle is quite different, if they are compared from some aspects, they are also the same in some aspects. After all, the main learning line is MySQL.
Although the architecture of MySQL and Oracle is quite
Basic MySQL commands and basic mysql commands
SQL
Statement
Mysql version: For mysql-5.6.36 version1.1 Common commands
# View database mysql> show databases; show databases like '% pres %'; # fuzzy query # View table mysql> use xzymysql> show
MySQL: checking rules and mysql checking rules
Proofreading rules: Compare the order of Characters in the current encoding. (Cs is case sensitive, ci is case insensitive, and bin binary encoding is compared)
1. view the current checking rule show
MySQL Learning (2)-SQL statement creation, deletion, modification, and Chinese garbled characters
1. Database Operations
1. Create a database
Create database name;
Create an encoded: create database name character set encoding;
View the encoding:
Basic Mysql operations and Data TypesGo to mysql: mysql-hlocalhost-uroot-p; mysql-uroot-p password; view the help document: help to view the database name (s); create database: create database database_name; create databse if not exists
Database Operations and database operation statements1. Create a database: Create database db name [database options]; tip: The statement must use the statement Terminator ";" to end the service. Identifier (Database Name) Naming rules: Case
Summary of MySQL methods for obtaining database and table information, mysql Summary
Obtain database and table information:
Mysql> connect; mysql> show databases; mysql> show tables from db_name; mysql> show columns from tbl_name; mysql> show
Recommended Methods for hierarchical output of MySQL help contents content, mysqlcontents
This situation often occurs when you log on to the database through the MySQL client in an inaccessible environment and want to perform an operation, but
The following articles mainly introduce the actual usage of MySQL show. MySQL show is often used in actual applications. The following articles describe the actual usage of MySQL show, I hope it will help you in this regard.
Show tables or show
A good article helps www.2cto.comdatabase201511101151.html MySQL to see Chinese garbled characters for the following reasons: 1. server configuration problems, such as the problem of setting the language families (including character and collation)
MySQL, PHP, and mysqlphpLog on to MySQL mysql-hlocalhost-uroot-proot and exit MySQL exit
Each statement must be followed by a plus sign :--------------------------------------------
Show DatabaseShow databases; check the number of DATABASES on the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.