Comment peut on récupérer les noms des tables d'une base de donnée.
Regardes la vue système INFORMATION_SCHEMA.tables
Une description des vues systemes information_schema est :
http://developer.mimer.com/documenta...ic_views2.html
Quelqu'un peut me dire la commande qui permet d'afficher la description d'une table sous SQLServer.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 select Table_name from INFORMATION_SCHEMA.tables where table_type='BASE TABLE' order by table_name
merciDeux solutions
Code:
Ou
Code : Sélectionner tout - Visualiser dans une fenêtre à part sp_help MaTable
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 select column_name as champ, COALESCE(domain_name, cast(data_type as varchar(128))+ ISNULL(' ' + cast(character_maximum_length as varchar(10)) ,'')) as type_donnee, CASE UPPER(IS_NULLABLE) when 'YES' then '' when 'NO' then 'Oui' when Null then '' else IS_NULLABLE END as Obligatoire, '' as description from INFORMATION_SCHEMA.columns where table_name = 'Matable' order by table_name, ordinal_position
Partager