Mysql-6-data types and operators, mysql-6-Data Types
1. mysql Data Type
(1) numeric data type: including integer tinyint, smallint, mediumint, int, bigint, float and double Floating Point decimal type.
(2) date/time type: including year, time, date,
Mysql-6 data retrieval (4), mysql-6 Data RetrievalSummary data
Function
Description
AVG ()
Returns the average of a column.
COUNT ()
Returns the number of rows in a column.
MAX ()
Returns the maximum
MySQL (6), mysql1 foreign key
Foreign key: foreign key, the external key (the key is not in the table itself). If a field (non-primary key) in a table points to the primary key of another table, this field is called a foreign key.
1.1 add
Mysql (6) string mode matching links: Mysql (1) mysql Installation http://www.bkjia.com/database/201210/162314.html Mysql (2) Database Operations http://www.bkjia.com/database/201210/162315.html Mysql (3) operations on Data Tables
Community (php & amp; mysql) 6 // This is bbs. SQL
Create table bbs_area (
Id int (10) unsigned DEFAULT '0' not null auto_increment,
Master varchar (150) not null,
Banner varchar (150) not null,
Body text not null,
Email varchar (50 ),
Login
Use the properties file to configure the database driver, URI, user name and password, so as to make it easier to change the database later without changing the source code;driver=Com.mysql.jdbc.Driveruri=jdbc:mysql://localhost:3306/day10user=
1. Create data (insert data)(1) INSERT INTO Tab_name(field list) values(Value list)(2) If you need to set values for all fields when inserting, you can omit the field list. Requirements are the order of values and should be consistent with the order
Summarize data
Function
Description
AVG ()
Returns the average of a column
COUNT ()
Returns the number of rows in a column
MAX ()
Returns the maximum value of a column
# Corresponding database # phpMyAdminMySQL (the best combination with PHP)-Dump # phpwizard. netphpMyAdmin # HOST: localhost: 3306 database: study28 # metadata # corresponding database
# PhpMyAdmin MySQL (the best combination with PHP)-Dump
# Http:
// This is bbs. SQLCreate table bbs_area (Id int (10) unsigned DEFAULT '0' not null auto_increment,Master varchar (150) not null,Banner varchar (150) not null,Body text not null,Email varchar (50 ),Login varchar (20 ),Passwd varchar (20 ),Primary
When you want to optimize query performance, the best way is to figure out how MySQL optimizes and executes the query. Understand the internal mechanism, in order to better implement the design.
When MySQL executes a query, what exactly does it do,
Method 1,Curdate (), Curtime (), now ()Method 2,Utc_date (), Utc_time (), Utc_datetime ();You can see that UTC time is 8 hours smaller than the eight area.AttentionFunctions that return their current date or time are evaluated once at the beginning
# & Nbsp; corresponding & nbsp; database # php (as the mainstream development language) MyAdminMySQL (the best combination with PHP)-Dump # http: // php (as the mainstream development language) wizard.net/php (as the mainstream development language)
Such loops can be used to handle a long list of things (for example, jokes stored in a database), and here's a simple example: count to 10.
$count = 1;while ($count Echo ("$count");$count + +;}
I know this sentence may
See a news on CSDN:
At a recent MySQL user conference, MySQL CEO Marten Mickos announced that the next large version of the MySQL open source database, MySQL 6.0, will be introduced into their self-developed Falcon storage engine. MySQL's
As long as the description of several day-to-day use of the query can be optimized place, only special circumstances can be used, do not expect any circumstances are set up, optimization is a long process of practice!
Optimization of maximum and
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.