Goal: Create three tables, Student table student (Sid,name,gender), curriculum Course (cid,name), score mark (Mid, Sid, CID, gender);Requires SID, Cid, and mid as the primary key,Student name can only be F or MThe SID CID in Mark is a foreign key,
1. Database table operations:
-Start the MySQL server first, open the CMD window in the directory where MySQL is installed, and run MySQL: ' mysql.exe-hlocalhost-p3306-uroot-p123456 ';
-View all databases: show databases; --Create DATABASE
1. Create userCreate a username that is Lefunyun password is X5A4FU8I0LKM21YPYUZP accountCREATE USER [email protected] identified by ' X5A4FU8I0LKM21YPYUZP ';2. Give account AuthorizationGrant the account all permissions to the Lefuyun library,
1. Problem: The recent use of MySQL database operation, in DOS use command line to the MySQL insert/read Chinese when garbled problem.2. Reason: Because the cmd client default encoding is GBK, and I install MySQL when the encoding is UTF-8; If you
Select T1.id,t2.idfrom T1Left JOIN T2 on t1.id = T2.id and t1.id>1 and t2.id<>3In the left join of MySQL the condition is placed behind and is different in the back of the Where;1. On the back only for the T2 table filter, so the above t1.id>1
InquireMySQL server address ="192.168.1.166"User name="Root"Password="123"Database name="Bookshop"Port number="3306"MySQL handle=Plugin.Super_MySQL.mysql_connect (MySQL server address, user name, password, database name, port number) SQL
Installing and configuring the Python3.6+flask+mysql database
Download and install MySQL database
Download and install Mysql-python middleware
Pip Install Flask-sqlalchemy (Python's ORM Framework SQLAlchemy)
MySQL
Installing and configuring the Python3.6+flask+mysql databaseDownload and install MySQL databaseDownload and install Mysql-python middlewarePip Install Flask-sqlalchemy (Python's ORM Framework SQLAlchemy)2. mysql Database creation3. Database
First, the use of the MySQL database on Windows, to Linux is not very familiar with, this also as a record of their own.First, the MySQL official also gave two installation methods:One: Download the form of the installation package,Because I
MySQL uses Latin (iso-8859-1) by default, while Java uses Unicode encoding by default. Therefore, when inserting data into the MySQL database in Java, or when reading data, it is necessary to first convert the encoding method.1, first view the
1. Installing and configuring the Python3.6+flask+mysql database(1) Download and install MySQL database(2) Download and install Mysql-python middleware(3) pip install Flask-sqlalchemy (Python ORM Framework SQLAlchemy)2.mysql Creating a Database3.
Installing and configuring the Python3.6+flask+mysql database
Download and install MySQL database
Download and install Mysql-python middleware
Pip Install Flask-sqlalchemy (Python's ORM Framework SQLAlchemy)
MySQL
Installing and configuring the Python3.6+flask+mysql database
Download and install MySQL database
Download and install Mysql-python middleware
Pip Install Flask-sqlalchemy (Python's ORM Framework SQLAlchemy)
MySQL
Installing and configuring the Python3.6+flask+mysql database
Download and install MySQL database
Download and install Mysql-python middleware
Pip Install Flask-sqlalchemy (Python's ORM Framework SQLAlchemy)
MySQL
I. Overview of the view (technical text):(1) What is a view?A view is a table of visualizations based on the result set of an SQL statement.The view contains rows and columns, just like a real table. A field in a view is a field from a real table in
SQL connection query and SQL connectionBrief Introduction
Briefly review and summarize the similarities and differences between different table join statements and some concepts.
The statement for creating a database is as follows:
1 drop database
Mysql transaction,Database Transaction Features: acida: atomicity. A single operation either succeeds or fails to be rolled back. (Atomicity) c: consistency. data must be consistent before and after execution. (Consistency) [For transfer: for
Create a table in MySQL to specify the storage engine, and create a storage engine in mysql.
Create table test (Id int (10) unsigned not null auto_increment,Name varchar (10) character set utf8,Age int (10 ),Primary key (id))Engine = MyISAM
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