Set Field's Default Value 
Author Message
 Set Field's Default Value
Dear all

Is it possible to set a field's default value in SQL Analyser?
When I created the table, I have not set the default values for the fields
but I know I can change that in the Enterprise Manager. Can I do that in the
SQL as well in the SQL Analyser.

Kevin



Fri, 05 Sep 2003 21:14:44 GMT
 Set Field's Default Value

yes, see BOL under ALTER TABLE (T-SQL)
--
HTH,
David Satz
Principal Software Engineer
Hyperion Solutions
->Using SQL Server 7.0 SP3/6.5 SP5a/Cold Fusion 4.5.1 SP2/VSS
(Please reply to group only - emails answered rarely)
-----------------------------------------------------------------

Quote:
> Dear all

> Is it possible to set a field's default value in SQL Analyser?
> When I created the table, I have not set the default values for the fields
> but I know I can change that in the Enterprise Manager. Can I do that in
the
> SQL as well in the SQL Analyser.

> Kevin



Fri, 05 Sep 2003 21:48:01 GMT
 Set Field's Default Value
Hi Dave

What is BOL?? I looked at the T-SQL help but could not find it.

Kevin


Quote:
> yes, see BOL under ALTER TABLE (T-SQL)
> --
> HTH,
> David Satz
> Principal Software Engineer
> Hyperion Solutions
> ->Using SQL Server 7.0 SP3/6.5 SP5a/Cold Fusion 4.5.1 SP2/VSS
> (Please reply to group only - emails answered rarely)
> -----------------------------------------------------------------


> > Dear all

> > Is it possible to set a field's default value in SQL Analyser?
> > When I created the table, I have not set the default values for the
fields
> > but I know I can change that in the Enterprise Manager. Can I do that in
> the
> > SQL as well in the SQL Analyser.

> > Kevin



Sat, 06 Sep 2003 06:47:05 GMT
 Set Field's Default Value
BOL = Books Online. You find it in the SQL Server program group.

--
Tibor Karaszi, SQL Server MVP
FAQ from Neil at: http://www.sqlserverfaq.com
Please reply to the newsgroup only, not by email.

Quote:

> Hi Dave

> What is BOL?? I looked at the T-SQL help but could not find it.

> Kevin



> > yes, see BOL under ALTER TABLE (T-SQL)
> > --
> > HTH,
> > David Satz
> > Principal Software Engineer
> > Hyperion Solutions
> > ->Using SQL Server 7.0 SP3/6.5 SP5a/Cold Fusion 4.5.1 SP2/VSS
> > (Please reply to group only - emails answered rarely)
> > -----------------------------------------------------------------


> > > Dear all

> > > Is it possible to set a field's default value in SQL Analyser?
> > > When I created the table, I have not set the default values for the
> fields
> > > but I know I can change that in the Enterprise Manager. Can I do that in
> > the
> > > SQL as well in the SQL Analyser.

> > > Kevin



Sat, 06 Sep 2003 15:39:47 GMT
 Set Field's Default Value
Sorry Tibor
I think I pressed the wrong reply button.

Hi
As in the SQL Help, it seems that you can only set the field default value
by adding a new field rather than modifying existing field default value??

Kevin



Quote:
> BOL = Books Online. You find it in the SQL Server program group.

> --
> Tibor Karaszi, SQL Server MVP
> FAQ from Neil at: http://www.sqlserverfaq.com
> Please reply to the newsgroup only, not by email.




Quote:
> > Hi Dave

> > What is BOL?? I looked at the T-SQL help but could not find it.

> > Kevin



> > > yes, see BOL under ALTER TABLE (T-SQL)
> > > --
> > > HTH,
> > > David Satz
> > > Principal Software Engineer
> > > Hyperion Solutions
> > > ->Using SQL Server 7.0 SP3/6.5 SP5a/Cold Fusion 4.5.1 SP2/VSS
> > > (Please reply to group only - emails answered rarely)
> > > -----------------------------------------------------------------


> > > > Dear all

> > > > Is it possible to set a field's default value in SQL Analyser?
> > > > When I created the table, I have not set the default values for the
> > fields
> > > > but I know I can change that in the Enterprise Manager. Can I do
that in
> > > the
> > > > SQL as well in the SQL Analyser.

> > > > Kevin



Sun, 07 Sep 2003 07:13:31 GMT
 Set Field's Default Value
Not correct. Read about ALTER TABLE:

ALTER TABLE
 ADD CONSTRAINT xcsc DEFAULT 'Unknown' FOR column_name

I know that you can do that with EM as well...
--
Tibor Karaszi, SQL Server MVP
FAQ from Neil at: http://www.sqlserverfaq.com
Please reply to the newsgroup only, not by email.

Quote:

> Sorry Tibor
> I think I pressed the wrong reply button.

> Hi
> As in the SQL Help, it seems that you can only set the field default value
> by adding a new field rather than modifying existing field default value??

> Kevin



Sun, 07 Sep 2003 15:07:24 GMT
 
 [ 6 post ] 

 Relevant Pages 

1. Please help! re: setting field's default value differently for each region

2. Setting a column's default value with ADOX

3. Can't set default value creating Jet DB via ADO

4. Incrementing Next Field's Value Based Upon Prior Field's Value

5. Setting default value of field...having problems

6. VB3/Access 2 - Setting default value for added field

7. Setting Default Field Values when Building a Table on the Fly

8. Set default value to table fields

9. Unable to set logical field default value to False in Paradox 7

10. Set/ Read Field Default Value of Access/ Sql Server

11. Retrieve Fields' Default Values info

12. UDF as a table field's default value


 
Powered by phpBB® Forum Software