Skip to content

Commit e769cf2

Browse files
authored
Update hints-transact-sql-table.md
1 parent 4b1e874 commit e769cf2

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

docs/t-sql/queries/hints-transact-sql-table.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -308,22 +308,25 @@ REPEATABLEREAD
308308
Specifies that a scan is performed with the same locking semantics as a transaction running at REPEATABLE READ isolation level. For more information about isolation levels, see [SET TRANSACTION ISOLATION LEVEL (Transact-SQL)](../../t-sql/statements/set-transaction-isolation-level-transact-sql.md).
309309

310310
ROWLOCK
311-
Specifies that row locks are taken when page or table locks are ordinarily taken. When specified in transactions operating at the SNAPSHOT isolation level, row locks are not taken unless ROWLOCK is combined with other table hints that require locks, such as UPDLOCK and HOLDLOCK.
311+
Specifies that row locks are taken when page or table locks are ordinarily taken. When specified in transactions operating at the SNAPSHOT isolation level, row locks are not taken unless ROWLOCK is combined with other table hints that require locks, such as UPDLOCK and HOLDLOCK. ROWLOCK cannot be used with a table that has a clustered columnstore index. The following example returns [error 651](../../relational-databases/errors-events/database-engine-events-and-errors.md#errors--2-to-999) to the application.
312312

313-
> [!NOTE]
314-
> ROWLOCK can't be used when referencing a table with a clustered columnstore index.
313+
```sql
314+
UPDATE [dbo].[FactResellerSalesXL_CCI] WITH (ROWLOCK)
315+
SET UnitPrice = 50
316+
WHERE ProductKey = 150;
317+
```
315318

316319
SERIALIZABLE
317320
Is equivalent to HOLDLOCK. Makes shared locks more restrictive by holding them until a transaction is completed, instead of releasing the shared lock as soon as the required table or data page is no longer needed, whether the transaction has been completed or not. The scan is performed with the same semantics as a transaction running at the SERIALIZABLE isolation level. For more information about isolation levels, see [SET TRANSACTION ISOLATION LEVEL (Transact-SQL)](../../t-sql/statements/set-transaction-isolation-level-transact-sql.md).
318321

319322
SNAPSHOT
320323
**Applies to**: [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)] and later.
321324

322-
The memory-optimized table is accessed under SNAPSHOT isolation. SNAPSHOT can only be used with memory-optimized tables (not with disk-based tables). For more information, see [Introduction to Memory-Optimized Tables](../../relational-databases/in-memory-oltp/introduction-to-memory-optimized-tables.md).
325+
The memory-optimized table is accessed under SNAPSHOT isolation. SNAPSHOT can only be used with memory-optimized tables (not with disk-based tables), as seen in the following example. For more information, see [Introduction to Memory-Optimized Tables](../../relational-databases/in-memory-oltp/introduction-to-memory-optimized-tables.md).
323326

324327
```sql
325-
SELECT * FROM dbo.Customers AS c
326-
WITH (SNAPSHOT)
328+
SELECT *
329+
FROM dbo.Customers AS c WITH (SNAPSHOT)
327330
LEFT JOIN dbo.[Order History] AS oh
328331
ON c.customer_id=oh.customer_id;
329332
```

0 commit comments

Comments
 (0)