MySQL can save the binary data directly, the data type is BLOB.Fields that are commonly used in a database, such as text or integer types, and fields that need to be used to hold pictures are differentIs that the amount of data that needs to be
One: MySQL creates a stored procedure that modifies a table fielddrop procedure if exists pr_test;CREATE PROCEDURE Pr_test ()Begindeclare var int; declare var1 int;Set var=416; Set var1=420;While varUpdate xxx Set bb= ' 217 ', aa= ' 237 ' where ID
Tag:procedure trigger create mysql Stored procedure One, basic syntax create PROCEDURE sp_name ([proc_parameter[,...]) [Characteristic ...] Routine_body Beginendsp_name represents the name of the stored procedure proc_
Is to use the corresponding information chart of SQL and MongoDB, click the picture to view the big picture:
MongoDB features:
Developed Using C ++
Authorization Protocol: AGPL (client driver package: Apache)
Supports custom and binary
How to delete a data SQL statement in the mysql tutorial
The delete from statement is used to DELETE records FROM database tables.
Syntax
Delete from table_name WHERE column_name = some_value
Note: SQL is case insensitive. Delete from is equivalent
1. There is no Incremental backup mechanism for mysql databases. Backup is a big problem when the data volume is too large. Fortunately, the mysql database provides a master-slave backup mechanism, which is to write all the data of the master
I went to an interview with two cool Internet companies a few days ago and encountered problems in SQL. Well, unfortunately, let's take a look at it.
Score
1. Use group
Group by Dimension
For example:
Calculate the total score of each student.
When we use a query statement, the distinct operator often returns the first few or several rows of data in the middle. What should we do at this time? Don't worry,MysqlThis feature has been provided for us. SELECT * FROM table LIMIT [offset,] rows |
In mysql, there are actually a lot of methods and functions that are very useful. This introduction is called coalesce, and spelling is very troublesome, however, the function is to return the first non-null value of the input parameter, for example
When deleting data in mysql, an error occurs:
ERROR 1206 (HY000): The total of locks exceeds the lock table size
I checked and found that the innodb_buffer_pool_size configuration in mysql is too small, which causes InnoDB to fail to execute the
Mysql database Date and Time Functions, mysql function Daquan, summary record, for later use.
DAYOFWEEK (date)The return date is the day of the week (1 = Sunday, 2 = Monday ,...... 7 = Saturday, ODBC Standard)Mysql> select DAYOFWEEK ('2017-02-03 ');-
I. [operational specifications]1. If there is no remark, the first id field in the table must be the primary key and automatically grow;2. If there is no remark, use the UNSIGNED attribute for numeric fields;3. If there is no remark, order_id is
At the front-end time, my roommate asked me a question about mysql query:There are three tables:1. zd_product table zp_id primary key (product id) inputtime (product release time)2. zd_order order table zp_id foreign key (product id) zo_id primary
Because the default mysql engine is innodb, no engine is specified when phpmyadmin creates a table, that is, the default innodb is used. this engine is connected to ibdata1, ib_logfile0, and ib_logfile1 In the mysql/data/directory. These three files
There are two methods to implement fuzzy query in mysql: LIKE/not like, And REGEXP/not regexp. Next I will introduce their usage, I hope this tutorial will help you.
First, use LIKE/not like,Second, use REGEXP/not regexp (or RLIKE/not rlike, which
Let's take a look at the efficiency of php date () and SQL FROM_UNIXTIME (). In the end, the performance is better. Let's look at the instance together.
In php, there are two methods to convert the int type Timestamp to date and time. One is to use
Next, let's take a look at the mysql database show processlist result analysis. I hope this article will help you.
Mysql> show processlist;
+ -- + ----- + ------- +
| Id | User | Host | db | Command | Time | State | Info
+ -- + ----- + ------- +
| 20
Full-text indexing is a mysql database index. Full-text indexing can quickly implement full-text search. Its type is fulltext, next, let's take a look at how to create full-text indexes in MySQL and how to configure full-text indexes in mysql. I
Mysql comes with a very useful script for managing mysql services. The default path is $ MYSQL_HOME/support-files. The file name is mysql. server. $ MYSQL_HOME is the installation root directory of mysql. Mysql. server Usage:./mysql. server
1.
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