Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » SQL Anywhere Server - SQL Reference » SQL statements » Alphabetical list of SQL statements

WRITETEXT statement [T-SQL]

Permits non-logged updating of a CHAR, NCHAR, or BINARY column. This feature is provided solely for compatibility with Transact-SQL and its use is not recommended.

Syntax
WRITETEXT table-name.column-name
text-pointer [ WITH LOG ] data
Remarks

Updates an existing column value. The update is not recorded in the transaction log, unless the WITH LOG option is supplied. You cannot perform WRITETEXT operations on views.

Privileges

None.

Side effects

WRITETEXT does not fire triggers, and by default WRITETEXT operations are not recorded in the transaction log.

Standards
  • ANSI/ISO SQL Standard

    Transact-SQL extension.

Example

The following Embedded SQL code fragment illustrates the use of the WRITETEXT statement. The SELECT statement in this example returns a single row. The example replaces the contents of the Description column on the specified row with a new value.

EXEC SQL create variable txtptr binary(16);
EXEC SQL set txtptr =
    ( SELECT textptr(Description)
        FROM MarketingInformation
        WHERE ProductID = '500' );
EXEC SQL writetext MarketingInformation.Description
   txtptr 'newdata';