tailieunhanh - Hướng dẫn sử dụng MySQL part 15

MySQL hỗ trợ nhiều loại dữ liệu để hỗ trợ việc lưu trữ các loại dữ liệu khác nhau. Chương này liệt kê đầy đủ các các kiểu dữ liệu cũng như một mô tả về chức năng cú pháp, của họ, và yêu cầu lưu trữ dữ liệu. Đối với mỗi loại dữ liệu, hiển thị cú pháp sử dụng dấu ngoặc vuông ([]) để chỉ phần tùy chọn của cú pháp. Ví dụ sau cho thấy cách BIGINT được giải thích trong chương này: . | DRAFT 8 24 01 17 MySQL Data Types MySQL supports a wide variety of data types to support the storage of different kinds of data. This chapter lists the full range of these data types as well as a description of their functionality syntax and data storage requirements. For each data type the syntax shown uses square brackets to indicate optional parts of the syntax. The following example shows how BIGINT is explained in this chapter BIGINT display_size This indicates that you can use BIGINT alone or with a display size value. The italics indicate that you do not enter display_size literally but instead place your own value in there. Thus possible uses of BIGINT include BIGINT BIGINT 20 Like the BIGINT type above many MySQL data types support the specification of a display size. Unless otherwise specified this value must be an integer between 1 and 255. Table 17-1 lists the data types and categorizes them as numeric string date or complex. You can then find the full description of the data type in the appropriate section of this chapter. Table 17-1. . MySQL Data Types. Data Type Classification BIGINT Numeric BLOB String CHAR String CHARACTER String CHARACTER VARYING String Copyright 2001 O Reilly Associates Inc. 335 DRAFT 8 24 01 Table 17-1. . MySQL Data Types. Data Type Classification DATE Date DATETIME Date DEC Numeric DECIMAL Numeric DOUBLE Numeric DOUBLE PRECISION Numeric ENUM Complex FLOAT Numeric INT Numeric INTEGER Numeric LONGBLOB String LONGTEXT String MEDIUMBLOB String MEDIUMINT Numeric MEDIUMTEXT String NCHAR String NATIONAL CHAR String NATIONAL CHARACTER String NATIONAL VARCHAR String NUMERIC Numeric REAL Numeric SET Complex SMALLINT Numeric TEXT String TIME Date TIMESTAMP Date TINYBLOB String TINYINT Numeric TINYTEXT String VARCHAR String YEAR Date In some cases MySQL silently changes the column type you specify in your table creation to something else. These cases are VARCHAR - CHAR When the specified VARCHAR column size is less than 4 characters it is

TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.