Using the Scripting Feature in Object Browser

SQL Query Analyzer Help

SQL Query Analyzer Help

Using the Scripting Feature in Object Browser

Object Browser provides scripting functionality for many of the displayed objects. The operations supported vary depending upon the type of object. For example, table objects can generate scripts containing SELECT statements, data definition statements (such as CREATE), or data manipulation statements (such as INSERT). Views can only generate SELECT statements or data definition statements. 

There are three options for scripting destinations:

  • Script Object to New Window
  • Script Object to File As

  • Script Object to Clipboard

For any of these scripting destinations, you can specify the following operations.

Operation Description
Create Generates a CREATE statement for the object.
Alter Generates an ALTER statement.
Drop Generates a DROP statement.
Select Generates a SELECT statement containing all of the tables columns in the select list
Insert Generates an INSERT statement and provides placeholders for the values to be inserted.
Update Generates an UPDATE statement and provides placeholders for values and the search condition.
Delete Generates a DELETE statement and provides a placeholder for the search condition.
Execute Generates an EXECUTE statement for a stored procedure.