Top.Mail.Ru
Мастера DELPHI, Delphi programming community Титульная страница Поиск, карта сайта Написать письмо 
| Новости | Поиск | FAQ | Статьи | Книги | Новости VCL |
| Форумы ЧАТ | Орешник | KOL и MCK |
Форумы -» Основная («Начинающим»)/ Базы / WinAPI / Компоненты / Сети / Media / Игры / Corba и COM / KOL / FreePascal / .Net / Прочее / RSDN.ORG

« предыдущая ветвь | форум | следующая ветвь »

View vs Table [D5, D6, MSSQL]


xxxx ©   (2004-01-30 16:25:00) 

Здраствуйте!
как програмным путем (при помощи запроса) различить
v


xxxx   (2004-01-31 10:39:00) [1]

OGROMNOYE SPASIBO!!!!!!!!!!!


ZrenBy   (2004-01-30 17:50:00) [2]


use pubs
--Список таблиц в БД pubs
select name from sysobjects where xtype="U"
--или
select table_name from information_schema.tables where table_type="base table"

--Список вьюх в БД pubs
select name from sysobjects where xtype="V"
--или
select table_name from information_schema.tables where table_type="view"

--Список SP в БД pubs
select name from sysobjects where xtype="P"
--или
select specific_name from information_schema.routines

--Список полей в таблице authors
select
column_name,
data_type,
character_maximum_length
from
information_schema.columns
where
table_name = "authors"


xxxx   (2004-01-30 17:24:00) [3]

use master - дает список баз
БД1, БД2, БД3 и т.д.

1) далее пишем
use БД1

2) получаем список tables
ADOConnect


ZrenBy   (2004-01-30 16:28:00) [4]


select
table_type
from
information_schema.tables
where
table_name="MyName"


Наверх

Титульная страница Поиск, карта сайта Написать письмо