Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to add a column placeholder allow NULL
Message
 
 
À
02/03/2012 01:56:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01536981
Message ID:
01537037
Vues:
33
>>Hi,
>>
>>What is the syntax of adding a placeholder-column to a cursor that would allow NULLs?
>>
>>Here is the code:
>>
>>
>>select MYTABLE.*, CAST(0 AS INT) AS MyField1 FROM MYTABLE
>>
>>
>>I need to make sure that the column MyField1 would accept NULLs. How do I do it? TIA.
>
>to get a nullable integer field,
>the min code on SQL SERVER is:
>
>-- fill with null value
>SELECT NULL AS IntField
>-- fill with not null value
>SELECT CAST(3 AS INT) AS IntField
>
First, thank you.
But why would one line, like the following, not get a nullable integer field?:
SELECT CAST(NULL AS INT) AS IntField
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform