zistenie nazvu stlpcov v tabulke(sql)
zistenie nazvu stlpcov v tabulke(sql)
viem nejakym selectom zistit nazvy stlpcov v tabulke?
-
javatar
Hardcore addict
- Príspevky: 6112
- Registrovaný: 12 aug 2010, 14:49
- Bydlisko: I don't exist at all.
Re: zistenie nazvu stlpcov v tabulke(sql)
DESCRIBE provides information about a table’s columns. It is a shortcut for SHOW COLUMNS FROM.
Syntax:
{DESCRIBE | DESC} tbl_name [col_name | wild]
col_name can be a column name, or a string containing the SQL `%’ and `_’ wildcard characters to obtain output only for the columns with names matching the string. There is no need to enclose the string in quotes unless it contains spaces or other special characters.
The SHOW CREATE TABLE and SHOW TABLE STATUS statements also provide information about tables.
platne pre MySQL - ale description boli urcite aj v ORACLE, aky mas DBS?
Syntax:
{DESCRIBE | DESC} tbl_name [col_name | wild]
col_name can be a column name, or a string containing the SQL `%’ and `_’ wildcard characters to obtain output only for the columns with names matching the string. There is no need to enclose the string in quotes unless it contains spaces or other special characters.
The SHOW CREATE TABLE and SHOW TABLE STATUS statements also provide information about tables.
platne pre MySQL - ale description boli urcite aj v ORACLE, aky mas DBS?
Re: zistenie nazvu stlpcov v tabulke(sql)
bezim na oracle, snad bude nieco podobne platit aj pre oracle
Re: zistenie nazvu stlpcov v tabulke(sql)
tak nakoniec stacilo pouzit takuto jednoduchu formulku 
select table_name, column_name from all_tab_columns
select table_name, column_name from all_tab_columns