TAILIEUCHUNG - Java Data Access—JDBC, JNDI, and JAXP phần 5

Nói chung, để tạo ra một đối tượng ResultSet updateable truy vấn phải tuân thủ các quy tắc sau: • Nếu bạn dự định chèn hàng vào một bảng, sau đó truy vấn SQL phải trả lại chìa khóa chính (s) của bảng. | Chapter 8 Mining Database Metadata with JDBC Structural information You can also use a DatabaseMetaData object to retrieve information on tables stored procedures referential integrity and data types. These methods return ResultSet objects. Of course the result sets differ depending upon the methods used to query the database. The number of columns ranges from 1 to 18 all of which may be of different data types. Most of the method calls are straightforward. However some such as those that provide column information enable you to supply string patterns as parameters to limit the number of rows returned. String patterns are essentially wildcard characters that enable you to narrow your search. You can use the underscore _ character to match any single character or the percent symbol to match zero or more characters. In general you should use string patterns to limit the number of rows returned by certain DatabaseMetaData methods. For example if you call the getColumns method to retrieve a result set of information on a certain table s columns you may accidentally retrieve the column names for every column in all the database s tables. In this instance the result set will contain not only the column information for the target table but the system s and user s tables as well. The result sets in this case will be quite large and probably meaningless. String Patterns String patterns enable you to filter the number of rows a result set returns. You can only use string patterns in the DatabaseMetaData methods that support them. Two special characters and _ enable you to build string patterns. You use the to match zero or more characters. For example EM will only allow the method to retrieve data that starts with the characters EM. The string pattern EM S will retrieve data that starts with EM and ends with S. The data can contain any characters in between and can be any number of characters in length. You can use the underscore to match a single character. EM_ will only .

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.