---
schema_version: "1"
id: 4a4b814af171fd7459f4803a786a6e88c703664fee627db3e448fdc0d4b20530
title: UPDATE
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-soql-sosl/guides/soql-sosl/sforce-api-calls-soql-select-update-tracking-update-viewstat.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-soql-sosl/guide/sforce-api-calls-soql-select-update-tracking-update-viewstat.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 828eaefa1e4a6029e0dc7f7e51fa3d3c6567bfb9773d971426a6f33abd199fcc
products:
  - SOQL and SOSL Reference
  - Platform Developer Content
---

# UPDATE

Track keywords that are used in Salesforce Knowledge article searches by using the `UPDATE TRACKING` optional clause. Determine how many hits a Salesforce Knowledge article has had by using the `UPDATE VIEWSTAT` optional clause.

## Update an Article’s Keyword Tracking with SOQL

`UPDATE TRACKING` is an optional clause that can be added to a `SELECT` statement of a SOQL query to report on article searches and views. Developers can use `UPDATE TRACKING` to track the keywords that are used in Salesforce Knowledge article searches.

```soql
SELECT Title FROM FAQ__kav
WHERE Keyword='Apex' and
Language = 'en_US' and
KnowledgeArticleVersion = 'ka230000000PCiy'
UPDATE TRACKING
```

## Update an Article Viewstat with SOQL

The `UPDATE VIEWSTAT` clause is used in a `SELECT` statement to report on Salesforce Knowledge article searches and views. You can get a view count for every article that you have access to online. Developers can use `UPDATE VIEWSTAT` to update an article’s view statistics.

You can use this syntax to increase the view count for every article you have access to online.

```soql
SELECT Title FROM Knowledge__kav
   WHERE PublishStatus='online' and
   Language = 'en_US' and
   KnowledgeArticleVersion = 'ka230000000PCiy'
   UPDATE VIEWSTAT
```
