SQL database-<2> database basic operations

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.