Once you execute a query in Interactive SQL, you can sort and edit the result set to modify the database. You can also select rows from the result set and copy them for use in other applications. The field delimiter, quoting character, and escape character for the results are controlled by the isql_field_separator, isql_quote, and isql_escape_character options, respectively. These options can be viewed and changed in Options window in Interactive SQL or by executing the SET OPTION statement. See Interactive SQL options.
Interactive SQL supports editing, inserting, and deleting rows. Editing the result set has the same effect as executing UPDATE, INSERT, and DELETE statements. After editing a result set, the equivalent INSERT, UPDATE, and DELETE statements are added to the Interactive SQL command history. See Recalling commands.
To edit a row or value in the result set, you must have the proper permissions on the table or column you want to modify values from. For example, if you want to delete a row, then you must have DELETE permission for the table the row belongs to.
You cannot edit a result set if you:
Select columns from a table with a primary key, but do not select all the primary key columns.
Attempt to edit the result set of a JOIN (for example, if there is data from more than one table in the result set).
Attempt to edit a table that has its editing disabled, see Enabling and disabling table editing.
Editing the result set may fail if you:
Attempt to edit a row or column you do not have permission on.
Enter an invalid value (for example, a string in a numeric column or a NULL in a column that does not allow NULLs).
When editing fails, an Interactive SQL error message appears explaining the error, and the database table values remain unchanged.
Editing table values from the Interactive SQL result set
Inserting rows into the database from the Interactive SQL result set
Deleting rows from the database using Interactive SQL
Copying columns, rows, and cells from an Interactive SQL result set
Sorting columns in an Interactive SQL result set
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0|