Many friends have installed MySQL but do not know how to use it. In this article we will learn some common MySQL commands by connecting MySQL, modifying passwords, and adding users.
One, the connection MySQL.
Format:
Mysql-h Host Address-U user Name-
Reference | grammar | Grammar reference I. DATA definition DDL (data definition Language) Data definition language refers to the format and form of data defined by the language, he is the first time each database to be established when to face, all
When a table is created, you may want to add, delete, or modify the table's columns, constraints, and so on as needed, and you need to modify the table structure.
7.4.1 Modified with Enterprise Manager
Select the table you want to make changes in
Read Catalogue
One: System data type
2. Floating-point data types
3. Character data type
4. Date and time data types
5. Text and graphic data types
6. Currency data type
7. Bit data type
8. Binary data types
9
One, MySQL data type:1. Numeric Type:integer type: when using the unsigned modifier, only positive values are taken, the value is not sufficient to specify the width, and the left fill spaceInteger types include: Tinyint,smallint,int, etc. Float
1. Null and non-emptynull field can be NULL NOT NULL cannot be empty2.auto_incrementAutoNumber , must be used with primary key, by default, starting value is 1, each increment is 13.PRIMARY KEYPRIMARY KEY constraint, there is only one primary key in
Bit integral typeThe bit data type is integral, and its value can only be 0, 1, or null. This data type is used to store data that has only two possible values, such as Yes or No, True or false, on, or off.Note: A data type that is space-saving and
Primary foreign key Two column data types must be consistentvarchar (max) It is not available as a primary key columnDatabase name, table name, character not allowed for column nameT-SQL statementsCreating a database: Create DATABASE Data0624_1 is
Acid refers to the four characteristics of things in a database management system (DBMS): atomicity, consistency, isolation, persistenceThings: In a database system, a transaction is a complete logical process consisting of a series of successive
SQL Common Commandshttp://blog.csdn.net/jenny0107/article/details/1332815Here are some common SQL statements, although very basic, but it is worth collecting, very useful for beginnersHow to use SQL Common commands:(1) Data record filter:Sql=
After learning the summary of MySQL, if in doubt, welcome, common progress! 1, Introduction: DDL: Data Definition Language (LANGUAGE,DDL) basic operation: Create drop Alter DML : Data manipulation LANGUAGE,DML Basic operations: INSERT, Update,
1. Make sure that the MySQL field "includes the library name, the table name" is correct, necessary to use the anti-quote2. Proofing SetRefers to the relationship between characters "character handling of field values"Collation set dependent on
First, the basic conceptThe Dbms:database Management system is a large software for manipulating and managing databases that is used to establish, use, and maintain databases.Rdbms:relational database Management system, which is based on the
Small summary OF---database---1. Basic common data types for databases①VARCHAR2 (size)//Floating length character type: Length will change, according to user input value to change the corresponding length, save memory space②char (size)//fixed
One, table space 1.1 create TABLE space--Problem: Create a tablespace named HP, specifying a data file of hp.dbf, and a size of 10m.' C:\app\hp\hp.dbf ' size 10Mautoextend on next 5mmaxsize unlimited;1.2 Deleting a table spaceDrop tablespace hp;1.3
Last week, I met a task that needed to be performed on a daily basis, before using Java to write a small program, because of the customer deployment time is uncertain, and I can remotely on the customer production environment database, so with the
Because the only one fan of the requirements, coupled with their own introspection, today to review the SQL language (with MySQL)"" means none () indicates that there must beEstablishment of database and table
Create DATABASE Database name
xTable of Contents [1] preparation [2] Create data table [3] View datasheet [4] record operation [5] record constraint [6] column operation [7] constraint action [8] Modify column [9] datasheet rename beforeThe data in the MySQL database is stored
A lot of skills learned from foreign paper, but not many people in the country to use, so issued, notes under ~First, the parameter injection technique for ORDER by:Both methods are the same way of thinking.Example. "Select Username,password from Uc_
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.