Start: Touch MySQL

Source: Internet
Author: User
Tags unique id mysql command line

Learn MySQL, without installing a MySQL database, installation must be very simple, in fact, I downloaded a MySQL5.7, Baidu a bit of installation steps, installed successfully. It's a lot simpler compared to Oracle.

Bought two books, read "MySQL must know will", suitable for beginners. The following part of the learning process will refer to this book. Although there are many e-books on the internet, paper books are better after all. Start below.

1. Database Basics

Database is now understood is actually the table, the table is divided into rows and columns, a database can have more than one table, each table records a class of information, such as a table records students ' scores, a table records the teacher's curriculum, if the student scores and teachers of the curriculum into a table, it feels more strange. Each column in the table needs to have a type value, whether it's a number, a text, or a length limit. The properties of these tables should be referred to as patterns. It is emphasized that each row in the table needs to have a unique ID, which is mainly convenient for subsequent searches, modifications, and so on.

In addition to the language of SQL, because I have the basis of C language, it is easier to understand. SQL, the language used to manipulate the database. The first chapter looks relatively easy.

2. Environment

The environment is relatively simple, the corresponding website of the book, provides SQL script, created the supplier, product catalog, customer list and customer order list. Download the script file. In the Windows Start bar, run MySQL Command line Client. Enter the password to enter the MySQL command line.

A create a database named Lab:myslq> create Databases lab;

b using the database:mysql> use lab;

C Execute the downloaded script to create the table:mysql> source G:\study\MySQL\mysql_scripts\create.sql;

D Execute the downloaded script insert value:mysql> source G:\study\MySQL\mysql_scripts\populate.sql

E View the contents of table vendors:myslq> select * from vendors;


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.