Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql server get type of column

SELECT 
    COLUMN_NAME, 
    DATA_TYPE, 
    CHARACTER_MAXIMUM_LENGTH AS MAX_LENGTH, 
    CHARACTER_OCTET_LENGTH AS OCTET_LENGTH 
FROM INFORMATION_SCHEMA.COLUMNS 
WHERE TABLE_NAME = 'table_name' 
AND COLUMN_NAME = 'column_name';
Comment

get column types SQL SERVER

SELECT DATA_TYPE 
FROM INFORMATION_SCHEMA.COLUMNS
WHERE 
     TABLE_SCHEMA = 'yourSchemaName' AND
     TABLE_NAME   = 'yourTableName' AND 
     COLUMN_NAME  = 'yourColumnName'
Comment

PREVIOUS NEXT
Code Example
Sql :: psql show with user is logged in 
Sql :: my sql version 
Sql :: create policy in sql 
Sql :: mssql get all table names 
Sql :: rows to comma separated values in mssql 
Sql :: oracle export view ddl 
Sql :: substr sql last character 
Sql :: split first name and last name in sql 
Sql :: how to truncate a table in databse 
Sql :: how do you use sql in you company 
Sql :: oracle user quota unlimited 
Sql :: access the postgres psql 
Sql :: get current date data in mysql 
Sql :: sql select except null 
Sql :: sql update alias 
Sql :: delete all table oracle 
Sql :: get last record in sql 
Sql :: string split in sql server 
Sql :: create column sql server 
Sql :: how to check current user in mysql 
Sql :: alter table add column with default value 
Sql :: sql asynchronous stored procedure call 
Sql :: getting next sequence value jpa postgress 
Sql :: this week mysql 
Sql :: sql server current date minus 5 years 
Sql :: psql show columns of table 
Sql :: FirebaseException ([cloud_firestore/permission-denied] The caller does not have permission to execute the specified operation.) 
Sql :: ORA-00903 
Sql :: postgres autoincrement primary key 
Sql :: oracle source code 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =