January 26, 2012 at 11:21 pm
Hi All,
A typical issue found in SQL Server 2008, not sure if any one observed.
I created a table with following SQL:
CREATE table TESTER (COL_A NVARCHAR(100), COL_B INT, COL_C NUMERIC(18,8));
When we export the Create Script by Right Click on the table > "Script Table To" > "Create To" > "new Query Window"> Script is As Below
CREATE TABLE [dbo].[TESTER](
[COL_A] [nvarchar](100) NULL,
[COL_B] [int] NULL,
[COL_C] [numeric](18, 8) NULL
) ON [PRIMARY]
When I try Querying the Meta Data table "SYS.ALL_COLUMNS" using the following Script
Select * from sys.all_columns where OBJECT_NAME(object_id) = 'Tester'
Result is:
namesystem_type_iduser_type_idmax_lengthprecisionscalecollation_name
COL_A23123120000Latin1_General_CI_AS
COL_B56564100NULL
COL_C1081089188NULL
Which shows me the Column Size where NVARCHAR is declared is shown double (200 Instead on 100).
Can some body explain why is this issue occurring, It is screwing the Procedured which are written based on the Meta Data, for Fetching the Create Script of a table.
please need help.....!
Thanks,
Sudhir Nune.
January 27, 2012 at 12:02 am
Double post.
Original topic with replies can be found here:
http://www.sqlservercentral.com/Forums/Topic1242597-391-1.aspx
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply