Beginning Visual Basic .NET Database Programming phần 2 pptx

69 292 0
Beginning Visual Basic .NET Database Programming phần 2 pptx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[...]... UnitsInStock 25 115 26 4.5 36 19.45 31 .23 21 11 20 26 27 15 104 To see a list of all products ending with G, you would put the percent sign before the G, like this: SELECT ProductName, UnitPrice, UnitsInStock FROM Products WHERE ProductName LIKE '%G' This statement returns results something like this: ProductName Chang Chef Anton's Cajun Seasoning Nord-Ost Matjeshering UnitPrice UnitsInStock 30 22 40 53 25 .89... Chef Anton's Cajun Seasoning Queso Cabrales Konbu Tofu UnitPrice UnitsInStock 18 10 22 39 13 53 21 6 23 .25 22 24 35 If instead you wanted to see all products that are less than $25 or have more than 10 in stock, you would use this statement: SELECT ProductName, UnitPrice, UnitsInStock FROM Products WHERE (UnitPrice < 25 ) OR (UnitsInStock > 10) Notice that records are returned if either criterion is... Camembert Pierrot Carnarvon Tigers Chai Chang Chartreuse verte Chef Anton's Cajun Seasoning Chef Anton's Gumbo Mix Chocolade Côte de Blaye UnitPrice UnitsInStock 39 10 18.4 34 62. 5 18 30 18 22 0 13 123 19 42 39 40 69 53 21 .35 12. 75 26 3.5 0 15 17 LIKE The LIKE operator allows you to perform partial string matching to filter records where a particular field starts with, ends with, or contains a certain set... The percent sign's purpose is to denote any sequence of characters, so that the database knows to search for all records that have a product name beginning with G, as shown below: ProductName Geitost Genen Shouyu Gnocchi di nonna Alice Gorgonzola Telino 12 UnitPrice 2. 5 15.5 38 12. 5 UnitsInStock 1 12 39 21 0 Querying the Database ProductName Grandma's Boysenberry Spread Gravad lax Guaraná Fantástica... complex and advanced task suited to experienced database programmers However, creating database applications using Visual Basic NET that read, update, insert, and delete data in SQL Server databases that have already been set up is well within the scope of this book and will be covered extensively For the creation and management of databases, Access or the Visual Studio NET Server Explorer are adequate... to run on other database platforms, those statements will have to be modified Statements that use syntax that does conform to ANSI 92, on the other hand, will not need modification to run on other ANSI 92 compliant databases With this history as the backdrop, let's delve into the details of how to use the T-SQL language to retrieve and modify information in Desktop Engine databases The Basics of T-SQL... Anton's Gumbo Mix 21 .35 0 Queso Cabrales 21 22 Konbu 6 24 This is a very simple example of a WHERE clause, so let's now look at some of the more complicated ways to filter data The table below shows some examples of the most commonly used Comparison Operators in WHERE clauses In our previous examples, we used the 'less than' (

Ngày đăng: 13/08/2014, 12:21

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan