TAILIEUCHUNG - PHP and MySQL by Example- P13

Tham khảo tài liệu 'php and mysql by example- p13', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Table . Most Common SQL Data Types Data Type Description maximum size is specified in the parentheses. TINYTEXT A string with a maximum length of 255 characters. TEXT A variable-length text string with a maximum length of 65 535 characters used for storing large text files documents text areas etc. BLOB Binary large object. A binary string with a maximum length of 65 535 characters used for storing binary files images sounds etc. Date and Time DATE yyyy-mm-dd year month day . 2006-10-30 Note MySQL also allows you to store 0000-00-00 as a dummy date. DATETIME yyyy-mm-dd hh mm ss date and time . 2006-10-30 22 59 59 TIMESTAMP yyyy-mm-dd hh mm ss date and time . 1970-01-01 date and time of last transaction on a row TIME hh mm ss time . 10 30 58 YEAR yyyy yy year in four or two digits . 1978 or 78 . Creating a Table Creating a table is a little more complicated than creating the database. The CREATE TABLE statement is used to create a new table in the database. First you must name the new table and then specify all the fields that will be included in the table as well as the data types and any other attributes. A data type can be an integer a floating-point real number such as a string of characters a date a time and so on. Not all databases will specify data types in the same way. To see what data types and attributes are available for MySQL see Table or the MySQL documentation. Designing your tables correctly is important and a subject that merits further research if you have not worked with databases before. See http od specificproducts a for an excellent beginner s tutorial on database design. For now here are some rules to keep in mind when designing the table 1. Choose the right data type for your fields for example use integer types for primary keys use float and double types for large numbers use decimal or numeric types for currency use the correct date format for times and dates and give .

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.