About 8,280,000 results
Open links in new tab
  1. How do I return the SQL data types from my query?

    Dec 17, 2014 · The first way to check data types for SQL Server database is a query with the SYS schema table. The below query uses COLUMNS and TYPES tables: SELECT C.NAME AS COLUMN_NAME, TYPE_NAME(C.USER_TYPE_ID) AS DATA_TYPE, C.IS_NULLABLE, C.MAX_LENGTH, C.PRECISION, C.SCALE FROM SYS.COLUMNS C JOIN SYS.TYPES T ON C.USER_TYPE_ID=T.USER_TYPE_ID WHERE C.OBJECT ...

  2. How to Check a Column’s Data Type in SQL - Database.Guide

    Jan 1, 2022 · Here’s an example of using that view to return column data type information: SELECT COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH AS MAX_LENGTH, CHARACTER_OCTET_LENGTH AS OCTET_LENGTH FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Products' AND COLUMN_NAME = 'ProductName';

  3. How to Get the Type of Columns in SQL - GeeksforGeeks

    Apr 5, 2024 · In this article, we cover retrieving column types in SQL using three methods: SQL's Information Schema, the DESCRIBE statement, and Database GUI Tools. Each method offers insights into column types, aiding effective data management.

  4. schema - SQL statement to get column type - Stack Overflow

    Nov 15, 2012 · In ISO SQL (i.e. most RDBMS today) you can use the INFORMATION_SCHEMA.COLUMNS view, which SQL Server supports. This view's DATA_TYPE column contains the T-SQL/SQL Server type names, except that it doesn't include arguments for parameterised types, which can result in …

  5. SQL Data Types (With Examples) - Programiz

    In SQL, each column has a data type that defines the kind of data that a column can store. In this tutorial, you will learn about Data Types in SQL with the help of examples.

  6. SQL Data Types for MySQL, SQL Server, and MS Access - W3Schools

    The data type is a guideline for SQL to understand what type of data is expected inside of each column, and it also identifies how SQL will interact with the stored data. Note: Data types might have different names in different database.

  7. How to Determine the Data Type of a Column Using SQL

    Jul 23, 2024 · In this tutorial, we’ll explore different ways to determine a column’s data type in various SQL-based systems. We’ll cover methods using the information_schema.columns and sys.columns views. Additionally, we’ll cover specific approaches for popular DBMSs.

  8. How to check data type in SQL? - California Learning Resource …

    Oct 28, 2024 · In SQL, a data type refers to the type of data that a column or field in a table can hold. This can include text, numbers, dates, and many others. Understanding the data type is crucial for effective data storage, retrieval, and analysis.

  9. 3 Ways to Get a Column’s Data Type in SQL Server (T-SQL) - Database.Guide

    Dec 8, 2021 · GUIs like SSMS or Azure Data Studio make it easy to see a column’s data type. Usually it’s a simple matter of navigating to the column in the object explorer and you can see the data type right next to the column. But if you’re using T-SQL, you’ll need to run a query.

  10. 4 Ways to Check a Column’s Data Type in MySQL - Database.Guide

    Dec 14, 2021 · Here are four ways to get the data type of a column in MySQL. The SHOW COLUMNS statement displays information about the columns in a given table or view. We can pass the name of the table or view to return information on its columns: Result: We can narrow it down to just one column if required: Result:

  11. Some results have been removed
Refresh