TAILIEUCHUNG - MySQL /PHP Database Applications Second Edition phần 2

bạn có thể làm những việc như nhìn vào giá trị của các biến và bước thông qua đường dây của một mã số tại một thời điểm. Breakpoint cũng có thể được thiết lập để thay vì tạm dừng thực hiện của chương trình, một lệnh hay kịch bản được thực hiện và sau đó chương trình hồ sơ thực hiện. | 36 Part 1 Working with MySQL MySQL prefers to receive dates as strings so 000601 is a better choice than a similar integer. Using strings for date values may save you from encountering some errors down the road. Extracting information from date and time columns can be a challenge. MySQL provides many functions that help manipulate these columns. date Usage date The date column type stores values in the format YYYY-MM-DD. It will allow values between 1000-01-01 and 9999-12-31. datetime Usage datetime null not null default The datetime type stores values in the format YYYY-MM-DD HH MM SS. It will allow values between 1000-01-01 00 00 00 and 9999-12-31 23 59 59. timestamp Usage timestamp size This is a handy column type that will automatically record the time of the most recent change to a row whether from an insert or an update. Size can be defined as any number between 2 and 14. Table 2-3 shows the values stored with each column size. The default value is 14. Bear in mind that if there are multiple Timestamp fields only the first will be automatically changed. A timestamp field can later be forced to update by explicitly assigning it to NULL. Table 2-3 timestamp FORMATS Size Format 2 YY 4 YYMM 6 YYMMDD 8 YYYYMMDD 10 YYMMDDHHMM 12 YYMMDDHHMMSS 14 YYYYMMDDHHMMSS Chapter 2 The Structured Query Language for Creating and Altering Tables 37 time Usage time This type stores time in the format HH MM SS and has a value range from -838 59 59 to 838 59 59. The reason for the large values is that the time column type can be used to store the results of mathematical equations involving times. year Usage year 2 4 In these post-Y2K days it s hard to imagine that you d want to store your years in two-digit format but you can. In two-digit format allowable dates are those between 1970 and 2069 inclusive. The digits 70-99 are prefaced by 19 and 01-69 are by 20. Four-digit-year format allows values from 1901 to 2155. Creating Indexes MySQL can create an index on any column. There can

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.