Table Nodes
This section covers the following topics:
How Table Nodes Work
The Table node is a child of the Tables Node. It represents any of the following table types:
-
Relational: Its child nodes are:
-
Table Column nodes for each column in the table
-
Constraints node for each constraint in the table
-
Indexes node for each index on the table
-
Triggers node for each trigger on the table
-
-
XML: Its child nodes are:
-
Constraints node for each constraint in the table
-
Indexes node for each index on the table
-
Triggers node for each trigger on the table
-
Notes:
-
The Table nodes do not include index-organized tables.
-
Tables with Invalid Status are not displayed.
The type of database connection determines the ownership of a table. For more information on the ownership of tables and other schema objects, see Data Connections Node and Schemas Node.
After you have created a table, you can begin to populate it by using Oracle Data Window to edit and view its data.
Starting with Visual Studio 2005, you can edit the name of the table in place by selecting the name and then clicking it to open an edit box or by choosing the Rename menu option to open the edit box.
Note: This feature only works in Visual Studio 2005 or higher.
To perform actions on a Table node: right-click this node and from the menu choose the appropriate command. To view the node's properties, select the node and/or click Properties in the node's menu. To view the table's data, double-click the Table node.
Drag and Drop Support
This node can be dragged and dropped into DataSet Designers and XML Schema Designers.
Please see the following Microsoft documentation:
-
DataSet Designer
http://msdn2.microsoft.com/en-us/library/314t4see(VS.80).aspx
-
XML Schema Designer
http://msdn2.microsoft.com/en-us/library/ms171943(vs.80).aspx
You can automatically generate a query for a table by dragging the table node onto the Oracle Query Window. Dragging a table node onto the Oracle Query Window will generated a query that will select all columns from the corresponding table.
Also, you can automatically generate a query for a table by dragging the table node onto the Microsoft Query Designer. This generates a query that selects all the columns from the corresponding table.
Menu Options
Menu Option | Description |
---|---|
Design |
Opens the table in the Table Designer. If the object associated with the table node is deleted from the database backend, this menu option does the following: Displays a message indicating that this object no longer exists in Oracle Database, and the Designer will not open. |
Retrieve Data |
Opens the table in the Data Window. If the object associated with the table node is deleted from the database backend, this menu option does the following: Displays a message indicating that this object no longer exists in Oracle Database, and no data window will open. |
Add Trigger |
Adds a new trigger to the table using the Table Designer. If the object associated with the table node is deleted from the database backend, this menu option does the following: Displays a message indicating that this object no longer exists in Oracle Database, and the Create Trigger dialog box will not open. |
Query Window |
Opens the Query Window so that you can execute SQL and PL/SQL queries from Visual Studio. |
Generate Create Script |
Writes the table definition to a |
Generate Create Script to Project |
Generates the table definition to a . If multiple objects in Server Explorer are selected, a master SQL script is created in the Oracle Database Project Scripts folder. This master script contains calls to individual child SQL scripts (one for each schema object) generated into the various schema object folders and this master script is ordered with dependencies taken into consideration. If there are multiple open Oracle Database projects, Visual Studio prompts you to select the project to add the script to. This operation can also be performed by dragging and dropping the Server Explorer node(s) directly onto a database project folder. See Managing Oracle Script Files for more information. Note: Oracle Database Project Version 2 projects are not supported. To add scripts to this project type, use Import Schema or Add Existing Item menu items on an Oracle Database Project Version 2 project folder, or use the Schema Compare tool. |
Privileges |
Opens the Grant/Revoke Privileges dialog box. |
Generate Code |
Generates example code that executes a SELECT against this table. From the submenu, select C#, Java, Python or Javascript. A new code window will open with the example code in the language selected. Generating code additional times for the same language type will place the additional code in the already open code window at the point of the cursor. If you do not want that, then close the open code window before regenerating code. |
Copy |
Copies the selected table to the clipboard for pasting into Visual Studio designers. This provides the same functionality as dragging and dropping the table to the Visual Studio designers. |
Delete |
Drops the table. If the object associated with the table node is deleted from the database backend, this menu option does the following: Displays a message indicating that this object no longer exists in Oracle Database, and the node is deleted. If the table cannot be dropped due to dependencies, a dialog box appears with two options. Click Yes to delete the table regardless of dependencies. Click No to skip the table deletion. |
Rename |
Allows you to edit the Table name in place in Server Explorer. Alternatively, you can select the Table name and then click one more time to open an edit box. |
Refresh |
Updates the Table node. If the database object associated with the node was deleted from the database, you will be asked if the node needs to be deleted from the Server Explorer. |
Properties |
Displays the Properties window. |
See Also
Tables Node | Table Column Node | Table Designer | Oracle Data Window | XML Schema Designer