TAILIEUCHUNG - SQL VISUAL QUICKSTART GUIDE- P10

SQL VISUAL QUICKSTART GUIDE- P10:SQL (pronounced es-kyoo-el) is the standard programming language for creating, updating, and retrieving information that is stored in databases. With SQL, you can turn your ordinary questions (“Where do our customers live?”) into statements that your database system can understand (SELECT DISTINCT city, state FROM customers;) | Chapter 3 Character String Types Use character string data types to represent text. A character string or just string has these characteristics It s an ordered sequence of zero or more characters. Its length can be fixed or varying. It s case sensitive A comes before a when sorted . In SQL statements a string is surrounded by single quotes. It s one of the types listed in Table . Character String Types Table Character String Types Type Description CHARACTER Represents a fixed number of characters. A string stored in a column defined as CHARACTER length can have up to length characters where length is an integer greater than or equal to 1 the maximum length depends on the DBMS. When you store a string with fewer than length characters in a CHARACTER length column the DBMS pads the end of the string with spaces to create a string that has exactly length characters. A CHARACTER 6 string Jack is stored as Jack for example. CHARACTER and CHAR are synonyms. CHARACTER VARYING Represents a variable number of characters. A string stored in a column defined as CHARACTER VARYlNG length can have up to length characters where length is an integer greater than or equal to 1 the maximum length depends on the DBMS. Unlike CHARACTER when you store a string with fewer than length characters in a CHARACTER VARYING length column the DBMS stores the string as is and doesn t pad it with spaces. A CHARACTER VARYING 6 string Jack is stored as Jack for example. CHARACTER VARYING CHAR varying and VARCHAR are synonyms. NATIONAL CHARACTER This data type is the same as CHARACTER except that it holds standardized multibyte characters or Unicode characters see the sidebar in this section . In SQL statements NATIONAL CHARACTER strings are written like CHARACTER strings but have an N in front of the first quote NT A for example. NATIONAL CHARACTER NATIONAL CHAR and NCHAR are synonyms. NATIONAL CHARACTER VARYING This data type is the same as CHARACTER VARYING except that it holds .

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.