What Is a Query?

A query is a database command that retrieves records. Using queries, you can pull data from one or more fields from one or more tables. You can also subject the data you retrieve to one or more constraints, known as criteria, that serve to limit the amount of data you retrieve.

In Visual Basic.NET, database queries are written in SQL. SQL is a fairly standard language for retrieving and otherwise manipulating databases; it's easy to learn and is implemented in many different databases, so you don't have to learn a totally new query language if, for example, you migrate your database application from SQL Server to Sybase or Oracle.

At least that's the theory. In practice, as with so many other "industry standards," every database vendor has its own way of implementing and extending a standard, and Microsoft is certainly no exception. Alhough SQL Server's implementation of SQL isn't radically different from those of other vendors', you should be aware as you learn the language that other dialects of SQL exist. In particular, if you're starting to use SQL Server for the first time after using Microsoft Access, you'll need to watch out for a number of pitfalls in SQL syntax we highlight them specifically as they come up.



Database Access with Visual Basic. NET
Database Access with Visual Basic .NET (3rd Edition)
ISBN: 0672323435
EAN: 2147483647
Year: 2003
Pages: 97

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net