Learn
the basic data types of a database simply before learning the base operation statement:
Data type:
Binary data: stored in 16 binary form
Fixed length: Binary
Variable length: varbinary
Character data:
Char: fixed length
VARCHAR: Not at the same length, but any item length cannot exceed 8KB
Date Time Data:
Datatime (1753-1-1,9999-12-31) smalldatetime (1900-1-1,2079-6-6)
numeric data
Integer data: bigint int samllint tinyint
Real data: Decimal:decimal[p (, s)] where p is the total number of digits, that is, the precision, S is the number of decimal places.
Float
Currency data:
Money
Special data types:
Bit:true, false; Yes, No
Text and image data types:
Texts: Text
Images: Image
Simple Writing specification
The SQL language is case-insensitive and the data in the database is case-sensitive
Encountered keywords can be expanded with [] parentheses
Comments:
--: Single line comment
/* * *: Multi-line Comment
More detailed information can be consulted
First, database operations: Create, delete, modify, rename and other basic operations
Create database name--Build
Drop database name--delete
ALTER DATABASE name--change
Second, data table operation: increase, delete, change, check
SQL database-<2> database basic operations