| title | View and Edit Data in a Table | ||
|---|---|---|---|
| ms.prod | sql | ||
| ms.technology | ssdt | ||
| ms.topic | conceptual | ||
| f1_keywords |
|
||
| ms.assetid | bb67ce83-a87a-4e14-84cd-9a5930fe74c8 | ||
| author | markingmyname | ||
| ms.author | maghan | ||
| manager | jroth | ||
| ms.reviewer | “” | ||
| ms.custom | seo-lt-2019 | ||
| ms.date | 02/09/2017 |
You can view, edit, and delete data in an existing table by using a visual Data Editor.
Warning
The following procedures uses entities created in previous procedures in the Connected Database Development section.
-
Right-click the Products table in SQL Server Object Explorer, and select View Data.
-
The Data Editor launches. Notice the rows we added to the table in previous procedures.
-
Right-click the Fruits table in SQL Server Object Explorer, and select View Data.
-
In the Data Editor, type 1 for Id and True for Perishable, then either press ENTER or TAB to shift focus away from the new row to commit it to the database.
-
Repeat the above step to enter 2, False and 3, False to the table.
Notice that as you are editing a row, you can always revert the changes to a cell by pressing ESC.
-
You can view your edits as a script by clicking the Script button on the toolbar. Alternatively, you can use the Script to File button to save them in a .sql script file to be executed later.
-
Right-click the Trade database in SQL Server Object Explorer, and select New Query. In the editor, type
select * from dbo.PerishableFruitsand press the Execute Query button to return the data represented by thePerishableFruitsview.