MySQL database Advanced (iv)--stored procedure one, introduction to Stored Procedures 1, Introduction to Stored ProceduresA stored procedure is a set of programmable functions that have a specific set of SQL statements that are compiled and saved in
How to use PHP to automatically back up a database1. PrefaceThere are many ways to backup MySQL database;For example:1. Using the Mysqldump functionMysqldump-u username-p dbname table1 table2 ... > Backupname.sql
The dbname parameter
1. Prepare:Install MARIADB, the latest version is 10.2,:https://downloads.mariadb.org/2. Basic knowledge: 2.1 Connection to the database:Mysql-h Xxx-u Xxx-p-H Local Host-U user Name-p password2.2 Library-level operations:2.2.1 Display database:
In database tables, using indexes can greatly improve query speed. Suppose we create a testindex table:CREATE TABLE Testindex (i_testid INT not null,vc_name VARCHAR () notnull);We randomly inserted 1000 records into it, including a i_testid vc_name 5
View index show index from database table nameALTER TABLE Database add index index name (database field name)PRIMARY key (primary key index)ALTER TABLE ' table_name ' ADD PRIMARY KEY (' column ')Unique (single index)ALTER TABLE ' table_name ' ADD
Study book "Database System Tutorial" third Edition Shi Bole1. What is an index?a, in a relational database, an index is a database structure associated with a table, and he can make the corresponding table's SQL statements execute faster. The index
IntroductionMySQL is currently one of the most widely used relational database, if used properly, can support enterprise-class high concurrency, high-reliability services, improper use and even a slightly higher level of personal sites are difficult
View IndexSHOW INDEX from database table nameFor example: SHOW INDEX from Order_info;Add indexALTER TABLE Database add index index name (database field name)Primary key IndexALTER TABLE ' table_name ' ADD PRIMARY KEY (' column ')For example: ALTER
Statement
This article is based on CentOS 6.x + CDH 5.x
When it comes to hive, you have to talk about how to call hive when you write a program. Here's an example of how to call hive query data data through Java to prepare a text file
Index
Database object index: A way to combine data, which can be quickly queried to specific records in a database object table by indexed objects, is the most common way to raise performance.
An index will contain one or more
This example for you to share the Android login, retrieve password, registration function of the implementation code, for your reference, the specific contents are as follows
1. The design of the database
I added two tables to the database, a
The difference between Oracle and MySQL
1. is a large database and MySQL is a small and medium-sized database, Oracle market share of 40%,mysql only about 20%, while MySQL is open source and Oracle price is very high Oracle.
2. Oracle supports large
Create a table
The CREATE TABLE statement in the SQL language is used to create a new database table. The use format for the Create table statement is as follows:
CREATE TABLE TableName
(Column1 data type,
Column2 data type,
Column3 data type);
You
Always do not pay attention to their own blog, the last lost just love dearly, now pay attention to it, decided to regularly back up the SQL. Write a small script as follows:
Copy Code code as follows:
#!/usr/bin/perl
Use warnings;
Use
One, MySQL installation
MySQL Downloads
http://dev.mysql.com/downloads/mysql/
MySQL version selection
MySQL feature custom selection installation
Function Customization Selection
Path Customization Selection
Set Root user password
1, the first duplication is easy to solve, the different database environment method similar:
The following are the referenced contents:
Mysql
CREATE TABLE TMP SELECT DISTINCT * FROM TableName;
drop TABLE TableName;
CREATE TABLE TableName SELECT
What is a MySQL database?
Typically, a database is a collection of data, and a database can be a collection of files on a memory or a collection of some memory data.
We usually say that the MySQL database, SQL Server database, etc. is actually a
Create a table
The CREATE TABLE statement in the SQL language is used to create a new database table. The use format for the Create table statement is as follows:
CREATE TABLE TableName
(Column1 data type,
Column2 data type,
Column3 data type);
1, do not use the database operation statement in the loop, the traversal;2. Use connection (join) instead of subquery:A. Delete no orders customer: Delete from CustomerInfo WHERE customerid Not IN (SELECT CustomerID from OrderInfo)B. Extracting all
1:mysql is the mode of C/s architecture and can log in with TCP/IP when logging in to MySQLThe first time you log in to MySQL, you can log in directly with MySQL without a password.You can log in directly.2: basic command after LoginAfter logging in
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.