TAILIEUCHUNG - Hướng dẫn sử dụng MySQL part 14

Trong chương này, chúng tôi bao gồm đầy đủ các SQL hỗ trợ bởi MySQL. Nếu bạn quan tâm đến khả năng tương thích với các cơ sở dữ liệu SQL, MySQL hỗ trợ chuẩn ANSI SQL2. Trong trường hợp đó, bạn nên tránh sử dụng bất kỳ MySQL phần mở rộng độc quyền tiêu chuẩn SQL. | DRAFT 8 24 01 16 SQL Syntax for MySQL In this chapter we cover the full range of SQL supported by MySQL. If you are interested in compatibility with other SQL databases MySQL supports the ANSI SQL2 standard. In that case you should avoid using any proprietary MySQL extensions to the SQL standard. Basic Syntax SQL is a kind of controlled English language consisting of verb phrases. These verb phrases begin with a SQL command followed by other SQL keywords literals identfiers or punctuation. Keywords are never case sensitive. Identifiers for database names and table names are case sensitive when the underlying file system is case sensitive all UNIX except Mac OS X and case insensitive when the underlying file system is case insensitive Mac OS X and Windows . You should however avoid referring to the same database or table name in a single SQL statement using different cases even if the underlying operating system is case insensitive. For example the following SQL is troublesome SELECT FROM tbl Table aliases are case sensitive but column aliases are case insensitive. If all of this case sensitivity nonsense is annoying to you you can force MySQL to convert all table names to lower case by starting mysqld with the argument -O lower_case_table_names 1. Literals Literals come in the following varieties Copyright 2001 O Reilly Associates Inc. 293 DRAFT 8 24 01 String Literals String literals may be enclosed either by single quotes or double quotes. If you wish to be ANSI compatible you should always use single quotes. Within a string literal you may represent special characters through escape sequences. An escape sequence is a backslash followed by another character to indicate to MySQL that the second character has a meaning other than its normal meaning. Table 16-1 shows the MySQL escape sequences. Quotes can also be escaped by doubling them up This is a quote . However you do not need to double up on single quotes when the string is enclosed by double .

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.