About 22,900,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 · See 3 Ways to Get a Column’s Data Type in SQL Server (T-SQL) for more options and examples. PostgreSQL. Postgres also supports the information_schema.columns view, but there are also a couple of other options.

  3. How to Get the Data Type of Columns in SQL Server?

    May 16, 2024 · Using either the INFORMATION_SCHEMA.COLUMNS view or the sys.columns catalog view, users can easily obtain the data type of columns in their SQL Server databases and helping effective database administration and development.

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

    Nov 16, 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. 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.

  6. SQL Server Management Studio - Determine data types

    Oct 26, 2016 · If you select a table name in the query window of Sql Server Management Studio and press ALT + F1 it will display the details of that table. In the background shortcut key will execute sp_help on your behalf, so in this example it executes: sp_help users, which is much quicker than typing it. Source Here. Perfect. love it.

  7. 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.

  8. How to Return a List of Data Types in SQL Server (T-SQL)

    Jul 8, 2019 · If you ever need to get a list of data types in SQL Server, you can use one of the system views to do just that. In particular, you can use the sys.types system catalog view. This view returns all system-supplied and user-defined data types defined in the database.

  9. Data types (Transact-SQL) - SQL Server | Microsoft Learn

    Nov 6, 2024 · In the SQL Server Database Engine, each column, local variable, expression, and parameter has a related data type. A data type is an attribute that specifies the type of data that the object can hold: integer data, character data, monetary data, date and time data, binary strings, and so on.

  10. Methods to Get Data Type and Column Information in SQL Server

    Mar 14, 2025 · When working with databases, it’s often necessary to retrieve metadata about the structure of your tables, including column names, data types, and other relevant properties. In SQL Server,...

  11. Some results have been removed
Refresh