Field type
1. INT[(M)]
Normal size integer type
2. DOUBLE[(M,D)] [ZEROFILL]
Normal size (double precision) floating point number type
3. DATE
Date type. The supported range is '1000-01-01' to '9999-12-31'. MySQL displays DATE values in 'YYYY-MM-DD' format, but allows you to use strings or numbers to assign values to DATE columns
4. CHAR(M)
Fixed-length string type, when stored, always fills the right side with spaces to the specified length
5. BLOB TEXT
BLOB or TEXT type, the maximum length is 65535 (2^16-1) characters.
6. VARCHAR
Variable length string type.
1: Show database
SHOW DATABAS,
2: Currently selected database,
mysql> SELECT DATABASE();
-------- ----
| DATABASE() |
------------
| test ;
------------
| DATABASE() |
------------
| test |
--------------------------
Tables contained in the current database Information:
mysql> SHOW TABLES;
--------------------------
| Tables in test
mysql> SHOW TABLES;
--------------------------
| Tables in test |
---------------- -----
| mytable1 | mysql> desc mytable1;
--------- ------------- ------ ----- --------- -------
| Field mysql> desc mytable1;
--------- ------------- ------ -- --- --------- -------
| Field | Type | Null | Key | Default | Extra |
--------- --- ---------- ------ ----- --------- -------
| s1 | varchar(20) | YES | NULL |
--------------------- ------ ----- --------- --- ----
5. Import database table
(1) Create a .sql file
(2) First generate a library such as auction.c:mysqlbin>mysqladmin -u root -p creat auction, you will be prompted Enter the password and create successfully.
(2) Import the auction.sql file
http://www.bkjia.com/PHPjc/631076.html
www.bkjia.com