Many business tables use design patterns that violate the first paradigm due to historical or performance reasons. That is, multiple attribute values are stored in the same column (the specific structure is shown in the table below ). In this mode,
Use two functions: length and char_length.
Length: the length of a calculated field. A Chinese character is counted as three characters. A number or letter is counted as one character.
Char_length: whether it is a Chinese character, a number, or a
The number of split fields must be limited. Therefore, it is impossible to store an infinite number of characters in a string.The table to which this field belongs is associated with this field. It must be a one-to-many relationship.For example, the
MySQL supports a large number of column types, which can be divided into three types: Number type, date and time type, and string (character) type. This section first provides an overview of available types, summarizes the storage requirements for
MySQL supports a large number of column types, which can be divided into three types: Number type, date and time type, and string (character) type. This section first provides an overview of available types, summarizes the storage requirements for
MySQL supports a large number of column types, which can be divided into three types: Number type, date and time type, and string (character) type. This section first provides an overview of available types, summarizes the storage requirements for
MySQL supports a large number of column types, which can be divided into three types: number type, date and time type, and string (character) type. This section first provides an overview of available types, summarizes the storage requirements for
There is a field that can store integers and decimals, such as 43 and 43 thousand yuan. how can I set a field that can store integers and decimals, such as 43 and 43 thousand yuan, can be saved, how should I set
Reply content:
There is a field
Example: tinyint (1) description: I understand that the maximum positive number of the Tinyint type is 255. What I don't understand is the purpose of setting 1 here. In fact, even if the length is set to 1, you can store any number greater than one
Problem:
When modifying house information, one field is the total number of floors floorall, which is an int field, allowing nullWhen the information is modified, if the value of this field is entered, a value is written to the database and Null
When updating records, mysql must add new values on the original values.
For example, there was a record:
Id
Country
A784829a-c0dc-4cb6-88a9-8c376fab83a6
USA
Update the country field now: Add "$ + $ UK" based on
The column types supported by MySQL are listed below. Below
Code Letters are used in the description:
MSpecifies the maximum display size. The max valid display size is 255.DApplicable to the floating point type and the number of digits
Add, modify, delete functions in the MySQL tutorial
ALTER TABLE tabelname add new_field_id int (5) unsigned default 0 NOT NULL auto_increment, add primary key (NEW_FIELD_ID);
Add a new column
ALTER TABLE T2 add d timestamp;ALTER TABLE infos add
MySQL supports a large number of column types, which can be grouped into 3 categories: numeric types, date and time types, and string (character) types. This section first gives an overview of the available types, summarizes the storage requirements
Today, the Chinese blog Alliance has bo friends feedback, zgboke.com can not submit blog, I was just ready to go to the Holiday Plaza Party, on the rush to submit a trial, found that the blog submitted when the following error is reported:
Tip
MySQL supports a large number of column types, which can be grouped into 3 categories: numeric types, date and time types, and string (character) types. This section first gives an overview of the available types, summarizes the storage requirements
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.