|
Как получить из таблицы column и их свойства... ????
|
|||
---|---|---|---|
#18+
как получить из каждой таблички и инсертить в другую табличку такие значения... name_column, idx={u или d},pk={0-нет,1-есть}, fk={table.column} ??? ... |
|||
:
Нравится:
Не нравится:
|
|||
21.08.2008, 15:06 |
|
Как получить из таблицы column и их свойства... ????
|
|||
---|---|---|---|
#18+
Select t.tabid, c.colname name_column, (select i.idxtype from sysindexes I where I.tabid = t.tabid and i.part1 = c.colno) idx, (select co.constrtype from sysindexes I, sysconstraints co where I.tabid = t.tabid and i.part1 = c.colno and co. idxname = i. idxname) pk, (select t1. tabname from sysindexes I, sysconstraints co, sysreferences r, systables t1 where I.tabid = t.tabid and i.part1 = c.colno and co.idxname = i. idxname and r.constrid = co. constrid and t1. tabid = r.ptabid) fk From systables t, syscolumns c Where t.tabname = 'имя таблицы' And t.tabid = c.tabid составные индексы не учитываются. Дальше в документацию ... |
|||
:
Нравится:
Не нравится:
|
|||
22.08.2008, 10:11 |
|
Как получить из таблицы column и их свойства... ????
|
|||
---|---|---|---|
#18+
огромное спасибо.... ... |
|||
:
Нравится:
Не нравится:
|
|||
22.08.2008, 10:24 |
|
Как получить из таблицы column и их свойства... ????
|
|||
---|---|---|---|
#18+
TmpFile()Select t.tabid, c.colname name_column, (select i.idxtype from sysindexes I where I.tabid = t.tabid and i.part1 = c.colno) idx, (select co.constrtype from sysindexes I, sysconstraints co where I.tabid = t.tabid and i.part1 = c.colno and co. idxname = i. idxname) pk, (select t1. tabname from sysindexes I, sysconstraints co, sysreferences r, systables t1 where I.tabid = t.tabid and i.part1 = c.colno and co.idxname = i. idxname and r.constrid = co. constrid and t1. tabid = r.ptabid) fk From systables t, syscolumns c Where t.tabname = 'имя таблицы' And t.tabid = c.tabid составные индексы не учитываются. Дальше в документацию а как же все таки учесть составные индексы...???? может изменить табличку куда они будут вставляться... ... |
|||
:
Нравится:
Не нравится:
|
|||
04.11.2008, 13:47 |
|
|
start [/forum/topic.php?fid=44&gotonew=1&tid=1607963]: |
0ms |
get settings: |
9ms |
get forum list: |
14ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
65ms |
get topic data: |
12ms |
get first new msg: |
7ms |
get forum data: |
2ms |
get page messages: |
51ms |
get tp. blocked users: |
1ms |
others: | 14ms |
total: | 183ms |
0 / 0 |