Data types: Data columns, stored procedure parameters, expressions, and data characteristics of local variables.
Plastic:
tinyint: One byte, 128 to 127;2 7-Time Square
SmallInt: Two bytes, 32768 to 32767;2 15-Time Square
Mediuint: Three bytes, 8388608 to 8388607;2 23-time Square
Int: Four bytes, 2147483648 to 2147483647;2 31-Time Square
BigInt: Eight bytes, 9223372036854775808 to 9223372036854775807;2 63-time Square
Floating point number:
float and double can also have (m,d) M as the number of digits, D represents the number of digits after the decimal point, the decimal is the exact value, and the other two are approximate values.
Date and Time type:
Character type:
In addition to the ability to store string data, other data can be stored, compared to slices and sound binary data
Store "ABC", char (6), then "ABC", which is fixed length, varchar (6), then store "ABC", not fixed length.
The Chinese character is a single byte.
Create and view database tables.
Datasheet: It's actually a table with rows and columns.
To create a table:
such as creating this table
Basic syntax
Then the instance operates
Use "Show tables from book" To display the table in this database, if the current database can be ' show tables '
So, the structure of the view table is "show columns from XX;" That's pretty much it.
You can also use describe XX or desc xx to see
Finally, the CREATE statement "show create TABLE xx;" is displayed for the data table.
Database MySQL Learning (2)