TAILIEUCHUNG - AJAX and PHP Building Responsive Web Applications phần 5

cho biết cột là không được phép để lưu trữ các giá trị NULL. Định nghĩa của NULL là không xác định. Khi đọc nội dung của bảng bạn thấy NULL, nó có nghĩa là một giá trị đã không được quy định cụ thể đối với lĩnh vực đó. Lưu ý rằng một chuỗi rỗng, hoặc một chuỗi có chứa các không gian, hoặc một giá trị "0" | Server-Side Techniques with PHP and MySQL Each column has a data type which describes its size and behavior. There are three important categories of data types numerical types character and string types and date and time types and each category contains many data types. For complete details on this subject refer to the official MySQL 5 documentation at http doc refman en . When creating a new data table you must decide which values are mandatory and mark them with the NOT NULL property which says the column isn t allowed to store NULL values. The definition of NULL is undefined. When reading the contents of the table you see NULL it means a value has not been specified for that field. Note that an empty string or a string containing spaces or a value of 0 for numerical columns are real non-NULL values. The primary key field can t allow NULLs. Sometimes instead of or complementary to disallowing NULLs for a certain field you may want to specify a default value. In that case when a new record is created if a value isn t specified for that field the default value will be used. For the default value you can also specify a function that will be executed to retrieve the value when needed. A different way of letting the system generate values for you is by using auto_i nerement columns. This is an option you will often use for primary key columns which represent IDs that you prefer to be auto-generated for you. You can set auto_i nerement only for numerical columns and the newly generated values will be automatically incremented so no value will be generated twice. Indexes are database objects used to improve the performance of database operations. An index is a structure that greatly improves searches on the field or fields it is set on but it slows down the update and insert operations because the index must be updated as well on these operations . A well-chosen combination of indexes can make a huge difference in the speed of your .

TỪ KHÓA LIÊN QUAN
Đã 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.