---
title: "What is the different between string and varchar?"  
description: "What is the different between string and varchar?"  
author: "Sandra Emily"  
published: 2024-01-14  
updated: 2024-01-17  
canonical: https://www.mindstick.com/forum/160561/what-is-the-different-between-string-and-varchar  
category: "mssql server"  
tags: ["mssql server", "sql server", "sql"]  
reading_time: 1 minute  

---

# What is the different between string and varchar?

What is the different between [string](https://www.mindstick.com/articles/1527/string-split-in-c-sharp) and [varchar](https://www.mindstick.com/forum/161878/what-is-the-difference-between-nvarchar-and-varchar)?

## Replies

### Reply by Manish Sharma

In the context of databases, the main difference between string and **varchar is that "string"** is a generic term used to refer to any sequence of characters, **while "varchar" specifically** refers to a variable-length character string data type.

In many database systems, **"string"** is not a specific data type, but rather a general term used to describe any type of text data. On the other hand, **"varchar"** is a specific data type that is used to store variable-length character strings. The **"varchar"** data type allows the storage of strings of varying lengths, up to a specified maximum length, while minimizing the storage space used.

In summary, **"string"** is a generic term for any sequence of characters, while **"varchar"** is a specific data type used to store variable-length character strings in a database.


---

Original Source: https://www.mindstick.com/forum/160561/what-is-the-different-between-string-and-varchar

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
