Home All Groups Group Topic Archive Search About
Author
30 Jun 2005 2:48 PM
Britney
Hi guys,
      When I try to generate a table script including index and primary key,

I want to apply this table script to another sql server.
but I got the following script return, do I really need this code?
this is statistics not index.  Is there a disadvantage if I don't use it?




/****** The index created by the following statement is for internal use
only. ******/
/****** It is not a real index but exists as statistics only. ******/
if (@@microsoftversion > 0x07000000 )
EXEC ('CREATE STATISTICS [Statistic_year] ON [dbo].[funds_flow] ([year]) ')
GO

Author
30 Jun 2005 3:19 PM
Ray
I'm pretty sure you do not need this if you are using the script to generate
table on another server. Check your scripting options and you won't get this
next time.

Are you using sql 7?  I have not seen this before

Show quote
"Britney" wrote:

> Hi guys,
>       When I try to generate a table script including index and primary key,
>
>  I want to apply this table script to another sql server.
> but I got the following script return, do I really need this code?
> this is statistics not index.  Is there a disadvantage if I don't use it?
>
>
>
>
> /****** The index created by the following statement is for internal use
> only. ******/
> /****** It is not a real index but exists as statistics only. ******/
> if (@@microsoftversion > 0x07000000 )
> EXEC ('CREATE STATISTICS [Statistic_year] ON [dbo].[funds_flow] ([year]) ')
> GO
>
>
>
>

AddThis Social Bookmark Button