Skip to content

Commit 4e024a4

Browse files
authored
Merge pull request #5330 from JennieHubbard/patch-1
Make examples more obvious per feedback
2 parents cf75e88 + 36e0cb9 commit 4e024a4

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

docs/t-sql/functions/cast-and-convert-transact-sql.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "CAST and CONVERT (Transact-SQL) | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "09/08/2017"
4+
ms.date: "03/28/2018"
55
ms.prod: "sql-non-specified"
66
ms.prod_service: "database-engine, sql-database, sql-data-warehouse, pdw"
77
ms.service: ""
@@ -47,10 +47,17 @@ ms.workload: "Active"
4747
[!INCLUDE[tsql-appliesto-ss2008-all-md](../../includes/tsql-appliesto-ss2008-all-md.md)]
4848

4949
Converts an expression of one data type to another.
50-
For example, the following examples change the input datatype, into two other datatypes, with different levels of precision.
50+
**Example.** Change the input datatype.
51+
52+
**Cast**
5153
```sql
5254
SELECT 9.5 AS Original, CAST(9.5 AS int) AS int,
5355
CAST(9.5 AS decimal(6,4)) AS decimal;
56+
57+
```
58+
**Convert**
59+
```sql
60+
5461
SELECT 9.5 AS Original, CONVERT(int, 9.5) AS int,
5562
CONVERT(decimal(6,4), 9.5) AS decimal;
5663
```
@@ -59,8 +66,7 @@ SELECT 9.5 AS Original, CONVERT(int, 9.5) AS int,
5966
|----|----|----|
6067
|9.5 |9 |9.5000 |
6168

62-
> [!TIP]
63-
> Many [examples](#BKMK_examples) are at the bottom of this topic.
69+
**Many more [examples](#BKMK_examples)** at the bottom of this topic.
6470

6571
![Topic link icon](../../database-engine/configure-windows/media/topic-link.gif "Topic link icon") [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
6672

0 commit comments

Comments
 (0)