Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

create table, default values

 
   Database Help (Home) -> Programming RSS
Next:  sql server emails  
Author Message
SOC

External


Since: Oct 17, 2006
Posts: 6



(Msg. 1) Posted: Sun Feb 18, 2007 9:35 am
Post subject: create table, default values
Archived from groups: microsoft>public>sqlserver>programming (more info?)

Hello,
I'm trying recreate tables using the script that can be generated using
enterprise manager. However the default values of columns are not generated.
Can anyone advise how this can be remedied?
Thanks Soc.

 >> Stay informed about: create table, default values 
Back to top
Login to vote
Tibor Karaszi

External


Since: Jan 29, 2004
Posts: 1559



(Msg. 2) Posted: Sun Feb 18, 2007 11:20 am
Post subject: Re: create table, default values [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Did you specify for the script generation to include constraints?

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"SOC" wrote in message
> Hello,
> I'm trying recreate tables using the script that can be generated using
> enterprise manager. However the default values of columns are not generated.
> Can anyone advise how this can be remedied?
> Thanks Soc.
>
>

 >> Stay informed about: create table, default values 
Back to top
Login to vote
SOC

External


Since: Oct 17, 2006
Posts: 6



(Msg. 3) Posted: Sun Feb 18, 2007 7:18 pm
Post subject: Re: create table, default values [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Yes, as far as I can see I have included defaults/constraints.

"Tibor Karaszi" wrote in
message
> Did you specify for the script generation to include constraints?
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
>
> "SOC" wrote in message

> > Hello,
> > I'm trying recreate tables using the script that can be generated using
> > enterprise manager. However the default values of columns are not
generated.
> > Can anyone advise how this can be remedied?
> > Thanks Soc.
> >
> >
 >> Stay informed about: create table, default values 
Back to top
Login to vote
Tibor Karaszi

External


Since: Jan 29, 2004
Posts: 1559



(Msg. 4) Posted: Mon Feb 19, 2007 2:42 pm
Post subject: Re: create table, default values [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

How did you script the table? What app (QA, EM, SSMS etc) and how did you generate the script?

What version and service pack do you have of:

SQL Server
The client tool (QA, EM, SSMS etc)

With above information, I might be able to reproduce what you are seeing...

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/


"SOC" wrote in message
> Yes, as far as I can see I have included defaults/constraints.
>
> "Tibor Karaszi" wrote in
> message
>> Did you specify for the script generation to include constraints?
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>>
>> "SOC" wrote in message
>
>> > Hello,
>> > I'm trying recreate tables using the script that can be generated using
>> > enterprise manager. However the default values of columns are not
> generated.
>> > Can anyone advise how this can be remedied?
>> > Thanks Soc.
>> >
>> >
>
>
 >> Stay informed about: create table, default values 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Column default values - Hello everyone, I have the following problem I am not sure how to solve: I am using sql 2005. I have a database that has a product table (already with around 2000 products). The product table has a price column. I need to add another column called..

IDENTITY as Default values - I need some feedback on a tricky subject: Given: CREATE TABLE [TEST] ( [id] [bigint] IDENTITY (1, 1) NOT NULL , [id2] [bigint] NULL CONSTRAINT [DF__TEST__id2__7C104AB9] DEFAULT (dbo.IDENT('test')) [field] varchar NULL ) ON [PRIMARY] ....

Default constraints and values - Hi, Does anyone know why I am able to create a table such as follows? create table test (col1 nvarchar(1) default 'AA', col2 nvarchar(1) null) go Notice that I have a default value of 'AA' for a column that is defined as an nvarchar(1). SQL Server....

Obtaining default values after an INSERT - I am inserting a row into a database, and some columns insert default values (such as an @@identity column and a (getdate()) column). Though I can get the identity through @@identity, is there a way to get the other default values without having to..

Which systemtable or view hold the default values - CREATE TABLE [dbo].[ASSESSMENT]( [est_id] [int] NOT NULL DEFAULT ((0)), [overall_assessmnt] [float] NULL, [bldg_assessmnt] [float] NULL, [land_assessmnt] [float] NULL, [value_rounding] [int] NULL, ) this value DEFAULT ((0))adv thanks
   Database Help (Home) -> Programming All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]