Data type SQL Server
By FoxLearn 2/19/2024 9:41:15 AM 123
Here are some common data types used in SQL Server:
1. Numeric Data Types:
- INT: Integer data type for storing whole numbers.
- BIGINT: Large integer data type.
- DECIMAL/NUMERIC: Fixed-point decimal numbers.
- FLOAT/REAL: Floating-point numbers.
2. Character String Data Types:
- CHAR(n): Fixed-length character data type.
- VARCHAR(n): Variable-length character data type.
- TEXT: Variable-length character data for large text.
- NCHAR(n): Fixed-length Unicode character data.
- NVARCHAR(n): Variable-length Unicode character data.
- NTEXT: Variable-length Unicode character data for large text.
3. Date and Time Data Types:
- DATE: Date data type.
- TIME: Time data type.
- DATETIME: Date and time data type.
- DATETIME2: Date and time data type with higher precision.
- TIMESTAMP: Automatic timestamp value.
4. Binary Data Types:
- BINARY(n): Fixed-length binary data.
- VARBINARY(n): Variable-length binary data.
- IMAGE: Variable-length binary data for storing images or large binary objects.
5. Other Data Types:
- BIT: Boolean data type.
- UNIQUEIDENTIFIER: Globally unique identifier (GUID).
- XML: XML data type.
- JSON: JSON data type (available in newer versions).
These are just some of the data types available in SQL Server. Each data type serves a specific purpose and allows for efficient storage and manipulation of data within the database.
- How to export data to .csv file
- How to Read Excel file and Import data from Excel to SQL Server in C#
- How to Create a backup SQL Server in C#
- How to Search data from Database in C#
- How to rename a column name in SQL
- How to add primary key to existing table in SQL Server
- How to add index in SQL Server
- How to Download and Restore Northwind database to SQL Server