MySQL Code Build table, add and revise (CRUD)

Source: Internet
Author: User
Tags float double mysql code

I. Establishment of the table

CREATE TABLE Student (    numberkey,//Fixed primary key does not necessarily have to be self-increment, but the hook on the self-increment must be the primary key.     Name varchar (null,//design interface, non-null constraint     sex bit,    height decimal (8,2),//  Total 8 digits, 2 digits after decimal     birthday datetime    )

Decimal type float Double decimal

String varchar--------Consider length

The rest is not necessary, because int, datetime, char, BOOL (bit) are all default, and will not be useless.

int default 4 bytes, datetime default 8 bytes, char default 2 bytes, bit (bool) default 1 bytes

MySQL Code Build table, add and revise (CRUD)

Related Article

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.