Home > Database > Mysql Tutorial > MySQL常用语句笔记

MySQL常用语句笔记

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:40:46
Original
1093 people have browsed it

mysql SHOW DATABASES; mysql CREATE DATABASE mydb; mysql USE mydb; mysql SHOW TABLES; mysql CREAT E TABLE mytable ( - name VARCHAR(20) , - genda CHAR(1), - birth DATE , - addr VARCHAR(20) - ) ; mysql SHOW COLUMNS FROM mytable ; mysql DESCRI

mysql> SHOW DATABASES;

mysql> CREATE DATABASE mydb;


mysql> USE mydb;

mysql> SHOW TABLES;


mysql> CREATE TABLE mytable (

         -> name VARCHAR(20),

         -> genda CHAR(1),

         -> birth DATE,

         -> addr VARCHAR(20)

         -> );


mysql> SHOW COLUMNS FROM mytable;

mysql> DESCRIBE mytable;


mysql> SELECT * FROM mytable;


mysql> INSERT INTO mytable

         -> VALUES (

         -> 'cook',

         -> 'M',

         -> '1991-02-07',

         -> 'China'

         -> );


mysql> SELECT name                    // 排序后输出第四个名字

         -> FROM mytable

         -> ORDER BY name DESC

         -> LIMIT 3 1


Related labels:
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
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template