Wat is de SQL-statement om de eigenschappen van de tabel weer te geven?? dus veldnaam + type
bv:
naam varchar(30) NOT NULL
enz
HET GAAT OM EEN SYBASE DB
bv:
naam varchar(30) NOT NULL
enz
HET GAAT OM EEN SYBASE DB
Ken Thompson's famous line from V6 UNIX is equaly applicable to this post:
'You are not expected to understand this'
1
2
3
4
5
6
7
8
9
10
11
| SELECT SO.NAME AS TABLENAME,
SC.NAME AS COLUMN,
ST.NAME AS TYPE,
SC.LENGTH AS LENGTH
FROM SYSTYPES AS ST,
SYSCOLUMNS AS SC,
SYSOBJECTS AS SO
WHERE ST.USERTYPE = SC.USERTYPE AND
SO.ID = SC.ID AND
SO.ID > 10000
ORDER BY SO.NAME; |
Mja, dat is neit zo moeilijk te vinden.Op dinsdag 18 juni 2002 13:37 schreef emkedouwe het volgende:
nee ik heb die nog niet gevonden, ik heb een algemeen SQL boek. Iemand mischien een linkje ?
in http://download.sybase.com/pdfdocs/asg1250e/refman2.pdfGetting information about tables
• sp_help displays information about tables, listing any attributes (such
as cache bindings) assigned to the specified table and its indexes,
giving the attribute’s class, name, integer value, character value, and
comments.
• sp_depends displays information about the view(s), trigger(s), and
procedure(s) in the database that depend on a table.
• sp_helpindex reports information about the indexes created on a table.