Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Empty string for default on a char field
Message
General information
Forum:
Microsoft SQL Server
Category:
Database design
Miscellaneous
Thread ID:
00482602
Message ID:
00482777
Views:
11
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform