Modifying the properties of a data table
When you save the changes to the data table, you always get a warning that prevents changes.
There are 2 ways to solve this problem:
1. You can use T-SQL statements to forcibly modify
2. Tools Option Designer Table Designer and Database Designer block save requirements Check out
Set foreign keys
A table with a foreign key is called a foreign key table, where the "type" of the commodity table is a foreign key, so the commodity table is the outer table, which is associated with the "type number" of the type table.
Commodity table Design View
Type table Design view
Set the FOREIGN KEY constraint for the Type field of the commodity table, right-type field, select Relationship, open the Foreign key relationship window
Click the Add button, select the option button for the table and column specification row,
Select Primary key table, field, and foreign key table, field, OK, save
Verify that the modification type is a nonexistent type, and that the foreign KEY constraint conflict will be prompted when saving. Verification Success!
Create a View
Select the database, right-click the View node, select New View
In the Add Table window, click on the Product table, click Add, the Query window appears a view of the product table, and then click Close.
Then the query window click need to show the "Product Name", "brand", "Price", click the Execute button, you can display the table information in the bottom window, the field is checked.
Finally, save the view with the name "Product Overview" and the view is created.
Refresh, you can see the saved view in the View node.
Other views can have advanced filtering criteria, such as sorting, or qualifying conditions
The following is sorted by price, sales price is greater than 1300, made a filter, save as "high-priced goods" view.
Changes to the View
Deletion of views
SQL serever Learning 6--Data Sheet 2