Share this Page URL

Chapter 9. Extending Your Use of Queries > Working with Query Properties - Pg. 326

Extending Your Use of Queries CREATE INDEX SupplierName ON Suppliers (Name) WITH DISALLOW NULL; 326 Finally, to create an index that serves as the table's primary key, use a statement such as this: CREATE INDEX Suppliers ON Suppliers (SupplierID) WITH PRIMARY; Quick Check Q. How can you use a union query? A. A union query retrieves records from two different tables or queries that have the same structure. Working with Query Properties In Chapter 6, we described some of the properties of a query (the Top Values property, for example). In this section, we'll review two other important query properties that you use to control the number and type of records a query returns. Unique Values Property Some combinations of fields in a query will display duplicate values in the query's results. You can set the Unique Values property to Yes (it's set to No by default) so that the query's results show each unique combination only once. As an example, let's look at one of the queries we added to the Hel-loWorld9 database.