Mysql (Mariadb) basic operation statement (continuous update), mysqlmariadb

Source: Internet
Author: User

Mysql (Mariadb) basic operation statement (continuous update), mysqlmariadb

Basic SQL statements for reference. (Executed in HeiDiSql)

# Create Database If Not Exists VerifyIdear Character Set UTF8; # Create Table If Not Exists VerifyIdear. myTable (ID Bigint (8) unsigned Primary key Auto_Increment, Updatetime DateTime, name VarChar (128) Engine = MyISAM; # Switch to the specified database use verifyidear; # specify the table to add the field alter table MyTable add column If Not Exists adcolumn varchar (64) default ''; # Delete the field alter table MyTable drop column If Exists adcolumn;

 

# Add the alter table mytable comment 'test table' comment '; # modify the field name, type, default value, field sorting rule, comment, and field location alter table 'mytable' change column 'name' VARCHAR (128) default null collate 'utf8 _ general_ci 'comment' username 'after'thtime '; # modify Field Type, default value, sorting rule, comment, field location alter table mytable modify column name varchar (128) default null collate 'utf8 _ general_ci 'comment' username 'after thtime;

 

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.