September 17, 2018 at 9:05 pm
Comments posted to this topic are about the item Adding a Column Set
September 17, 2018 at 11:35 pm
Now that is interesting, thanks Steve.
good question
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
September 18, 2018 at 12:53 am
Interesting!
Also, you don't need to drop the entire table, you can drop sparse columns and re-add them with the ALTER TABLE command
CREATE TABLE UserConfig
( UserConfigKey INT IDENTITY(1,1) NOT NULL CONSTRAINT UserConfigPK PRIMARY KEY
, UserID INT
)
ALTER TABLE UserConfig ADD Options XML COLUMN_SET FOR ALL_SPARSE_COLUMNS
, IsActive BIT SPARSE
, IsSubscriber BIT SPARSE
, DefaultQuantity INT SPARSE
September 18, 2018 at 6:27 am
didn't know so learned something new, definitely not the answer i was expecting
Thanks for the question
---------------------------------------------------------------------------------------
The more you know, the more you know that you dont know
September 18, 2018 at 8:31 am
Sorry, I may be missing something but I was rather confused by this question because the question just reads "how do I add a column to this table" however the answers referred to XML data specifically.
Interesting topic though, learnt something new about SPARES data types.
September 18, 2018 at 11:20 am
Carlo Romagnano - Tuesday, September 18, 2018 12:53 AMInteresting!
Also, you don't need to drop the entire table, you can drop sparse columns and re-add them with the ALTER TABLE command
That's true, though in either case, saving the data becomes a chore. I didn't think of just adding the sparse columns back and the column set, but that's cool
September 18, 2018 at 11:21 am
n.ryan - Tuesday, September 18, 2018 8:31 AMSorry, I may be missing something but I was rather confused by this question because the question just reads "how do I add a column to this table" however the answers referred to XML data specifically.Interesting topic though, learnt something new about SPARES data types.
add a column set. That's a type of column, which is XML.
September 19, 2018 at 4:49 pm
Nice question and I learned something too. Thanks Steve.
September 19, 2018 at 5:14 pm
Steve Jones - SSC Editor - Tuesday, September 18, 2018 11:21 AMn.ryan - Tuesday, September 18, 2018 8:31 AMSorry, I may be missing something but I was rather confused by this question because the question just reads "how do I add a column to this table" however the answers referred to XML data specifically.Interesting topic though, learnt something new about SPARES data types.
add a column set. That's a type of column, which is XML.
Did I misread it, or has it been amended? 🙂
September 21, 2018 at 10:18 am
misread. There are a series on column sets that are running across weeks.
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply