1. Create table table name (name char), sex enum (' Male ', ' female '),..... );2. View all tables in the database show tables from database name; 3. View column information in the table show colunms from table name; /desc table name; 4. Add a
(1) Base operation of the library
View existing libraries: show databases;
Create library (set default character Set): Ccreate database name default Charset=utf8;
View the statement that created the library: show create database
Pessimistic lock Introduction (encyclopedia):Pessimistic locking, as its name implies, is a conservative attitude to the data being modified by the outside world (including other transactions currently in the system, as well as transactions from
1. Import the TXT file from MySQL query datamysql-h 10.3.20.251-u addata_r-p 3417-parreboehw9mijien_ep6bykoxktikunl ad_data-e "SELECT ID, Advertiser_id,date,cos t,0 as Cash_cost, 0 as Reward_cost, 0 as Return_goods_cost, Income,balance, Create_time,
1. Common commands1.1 Installing the databaseTake mysql56 as an example, store on the D drive, open cmd, and then enter the following command:(1) d:(2) CD mysql56(3) CD bin(4) Mysqld-installcan be installed.1.2 Starting the databaseEnter the
First Use the command to enter the database [Email protected] raul]# mysql-u root-penter password:welcome to the MySQL monitor. Commands End With; or \g.your MySQL connection ID is 3Server version:5.1.73 Source distributioncopyright (c), +, Oracle
1. Why do I learn MySQL stored procedures?Because I did not understand the stored procedure before, did not find the bug in time, then spent one months to learn the MySQL stored procedure, the company all the stored procedures and all the tables are
Day content:Components in 1.bootstrap2.bootstrap Plug-in1. First clear the timer with the timer2. First stop () with animation3.mysql Installation and useSocket Service SideHoldHow to save a user name and passwordDbUser.txtID username pwd1alex
The first is the modification of the database:-- Delete a database called bbb111 DROP DATABASE bbb111;Modification of a table in a database: renaming a table-- three kinds of effects in the same form TABLE to new name; ALTER TABLE formerly known
#-------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------# error 1 Reading table information for completion of table and
MySQL basic syntax:1. Create library: The name of the database;Create a library with encoded format: Create database name character set encoding format;Delete Library: drop database name;2. CREATE TABLE: Name of Creation table table (field 1 type 1,
Related queries in MySQL (internal connection, outer connection, self-connection)When using the database query statement, the single table query sometimes can not meet the project business requirements, in the project development process, there are
The previous article describes the order in which Oracle's select syntax is executed, which describes the order in which MySQL's select syntax is executed. MySQL's select syntax is executed in the same order as Oracle, only adding MySQL's unique
1. Common arithmetic operators1.1 Operators, functions, notes1.2 Precautions?? (1) integer (bigint) and integer (+,-,) result is bigint;?? (2) floating-point number and floating-point arithmetic (/), the result of the decimal place is the number of
EmployeeThe table contains all employee information, each employee has its corresponding ID, salary, and department ID.+----+-------+--------+--------------+| Id | Name | Salary | DepartmentID |+----+-------+--------+--------------+| 1 | Joe | 70
MySQL driver in Golang
MySQL Library Https://github.com/go-sql-driver/mysql
The go itself does not provide a specific database driver, but only provides driver interface and management.
Each database driver requires a third-party
Test environment for this experiment: Windows 10+cmd+mysql5.6.36+innodbI. Basic elements of a transaction (ACID) 1, atomicity (atomicity): All operations after the start of the transaction, or all done, or all do not, it is impossible to stagnate
Create foreign key mysql> create table ' Study_record ' ( -> ' ID ' int (one) NOT NULL, -> ' Day ' int not NULL, -> ' status ' char (+) NOT NULL, -> ' stu_id ' int (one) not null, - > PRIMARY KEY (' id '),
SELECT * from stu st,course co,score sc where st.sid = sc.sid and sc.cid = co.cidIf we are going to give SID a constraint, that is, the SID in the two tables should correspond, so we're going to add the foreign keyScore Association Stu:At this point,
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