Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I find out if the column allows nulls?
Message
De
25/04/2007 15:18:04
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Divers
Thread ID:
01043112
Message ID:
01219905
Vues:
10
Thank you.
>Sure
>IF EXISTS (SELECT * FROM pubs.INFORMATION_SCHEMA.TABLES
>         WHERE table_name = 'authors' AND table_type = 'BASE TABLE')
>  -- Table exists
>...
>

>
>
>>I have a question about the INFORMATION_SCHEMA view.
>>
>>I query the sysobjects to be sure that the table is in the db, will INFORMATION_SCHEMA allow me to do the same thing?
>>
>>I can't do a search at this time, other wise I would not be bothering you.
>>
>>Hope you're having a good day. :-)
>>
>>Beth
>>
>>>It's better to use INFORMATION_SCHEMA views than query system tables directly
SELECT * FROM
>>>	pubs.INFORMATION_SCHEMA.COLUMNS
>>>WHERE table_name = 'authors'	
>>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform