Would you call this a hack...?

Look at this piece of code...

Select *
into #Constant
from SCM3DConstant
WHERE 0=1

Would you call this piece of code a hack...? Think about the intent of this piece of code and leave comments...

Published Friday, December 28, 2007 3:17 PM by Nilotpal Das

Comments

Friday, December 28, 2007 6:38 AM by Mladen

# re: Would you call this a hack...?

No it's not a hack. it's a perfectly valid fast table creation.

Friday, December 28, 2007 7:36 AM by eduardo.campano

# re: Would you call this a hack...?

I use things like that to get info about tables without having to query sysobjects.

Friday, December 28, 2007 10:38 AM by The Other Steve

# re: Would you call this a hack...?

I would call it a hack.  It's probably reasonable hack compared to the alternative, but you definately need to leave a comment explaining what it is doing.

Friday, December 28, 2007 11:27 PM by vikram

# re: Would you call this a hack...?

Hmmm, I use these many a times in the normal code. So at least for me this is no hack

Leave a Comment

(required) 
(required) 
(optional)
(required)