How to create an Insert Values query (Enterprise Manager)

To create an Insert Values query

  1. Add the table you want to update to the Diagram pane.
  2. Convert the default query to an Insert Values query by right-clicking in the Diagram or SQL pane, choosing Change Type, and then choosing Insert Values.

    Note If more than one table is displayed in the Diagram pane when you start the Insert Values query, the Query Designer displays the Insert Values dialog box to prompt you for the name of the table to update.


  3. Define the data columns to create by adding them to the query. For details, see Adding Columns. Columns will be updated only if you add them to the query.
  4. In the New Value column of the Grid pane, enter the new value for the column. You can enter literal values, column names, or expressions. The value must match (or be compatible with) the data type of the column you are updating.

    Caution The Query Designer cannot check that a value fits within the length of the column you are inserting. If you provide a value that is too long, it might be truncated without warning. For example, if a name column is 20 characters long but you specify an insert value of 25 characters, the last 5 characters might be truncated.


    When you execute an Insert Values query, no results are reported in the Results pane. Instead, a message appears indicating how many rows were changed.

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.