Take the following steps to create a computed column using SQL Server Management Studio:
- Run SQL Server Management Studio from Start > Programs > Microsoft SQL Server 2005 > SQL Server Management Studio.
- In the Connect to Server window, click the Connect button.
- In the Microsoft SQL Server Management Studio window, double-click the Databases folder.
- In the Microsoft SQL Server Management Studio window, double-click the required database. Here, the Axle database is being used.
- In the Microsoft SQL Server Management Studio window, double-click the Tables folder.
- In the Microsoft SQL Server Management Studio window, right-click the required table and click Modify.
- Type the name of the new column. Here, Amount is the new column.
- In Column Properties, expand Computed Column Specification. In the Formula box, type the formula. Here, the Price column is multiplied by the Quantity column.
- Go to the File menu and click Save Products to save the modifications in the Products table.
No comments:
Post a Comment