mirror of
https://github.com/dbgate/dbgate
synced 2024-11-08 04:35:58 +00:00
19 lines
605 B
JavaScript
19 lines
605 B
JavaScript
module.exports = `
|
|
select
|
|
o.object_id AS objectId,
|
|
col.TABLE_SCHEMA as schemaName,
|
|
col.TABLE_NAME as pureName,
|
|
col.COLUMN_NAME as columnName,
|
|
col.IS_NULLABLE as isNullable,
|
|
col.DATA_TYPE as dataType,
|
|
col.CHARACTER_MAXIMUM_LENGTH,
|
|
col.NUMERIC_PRECISION as precision,
|
|
col.NUMERIC_SCALE as scale,
|
|
col.COLUMN_DEFAULT
|
|
FROM sys.objects o
|
|
INNER JOIN sys.schemas u ON u.schema_id=o.schema_id
|
|
INNER JOIN INFORMATION_SCHEMA.COLUMNS col ON col.TABLE_NAME = o.name AND col.TABLE_SCHEMA = u.name
|
|
WHERE o.type in ('V') and o.object_id =[OBJECT_ID_CONDITION]
|
|
order by col.ORDINAL_POSITION
|
|
`;
|