Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Empty string for default on a char field
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
00482602
Message ID:
00482777
Vues:
12
I guess I need to know what I should type in creating the structure of a table for empty string default. If I type '' it doesn't seem to work. For some reason I have to create two fields since I must type something in some field to get a new record to show up. If I type something in a second field cc a new record is created and the value of c field is . So I go back into design and there is '' sitting in the default area. What do you use?

Do you only use code?

Thanks again

>I'm not seeing what your seeing. This is what I did:
>
>create table x (c varchar(10) default '')
>insert into x default values
>
>select datalength(c) from x -- returns 0
>select c+'hello world' from x -- returns 'helloworld'
>
>-Mike
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform