mysql commands
Created|Updated
|Post Views:
Start
运行mysql程序
启动mysql8.0版本 1
net start mysql80
进入命令行模式
1
mysql -u root -p
接下来就可以用命令操作数据库
1
2
3
4
5
6
7
8
9
10//查看所有的数据库
show databases;
//改变默认数据库
use database_name;
//查看默认数据库中所有的表
show tables;
//查看某个表的结构
describe table_name;
//查看表中的记录
select * from table_name;
Related Articles
2021-06-23
database
Databasecreate database1create database database_name; delete database1drop database database_name; Tablecreate table123456CREATE TABLE table_name ( column1 datatype, column2 datatype, column3 datatype, ....); The column parameters specify the names of the columns of the table. The datatype parameter specifies the type of data the column can hold (e.g. varchar, integer, date, etc.). 1234567CREATE TABLE Persons ( PersonID int, LastName varchar(255), FirstName...
2021-12-03
mysql dataType
String Data Types Data type Description CHAR(size) A FIXED length string (can contain letters, numbers, and special characters). The size parameter specifies the column length in characters - can be from 0 to 255. Default is 1 VARCHAR(size) A VARIABLE length string (can contain letters, numbers, and special characters). The size parameter specifies the maximum column length in characters - can be from 0 to 65535 BINARY(size) Equal to CHAR(), but stores binary byte strings. The size...
2021-06-22
SQL Statement
IntroductionSQL stands for Structured Query Language. SQL lets you access and manipulate database. Using SQL in Your Web SiteTo build a web site that shows data from a database, you will need: An RDBMS database program (i.e. MS Access, SQL Server, MySQL) To use a server-side scripting language, like PHP or ASP To use SQL to get the data you want To use HTML / CSS to style the page DBMSThe data in RDBMS is stored in database objects called tables. A table is a collection of related...
Contents
