Can I create a table without any columns in SQL Server by t-sql?
+4
A:
A table is a collection of columns and rows. You need at least one column.
Digital gig
2010-03-13 12:38:38
More precisely: “A table is a collection of at least one column and at least zero rows”
Joey
2010-03-13 12:53:08
in postgresql you *can* indeed create tables without columns. But don't ask me why.
codymanix
2010-04-06 13:06:25
This seems to be supported by this SQL Server 2005 error message: CREATE TABLE NoColumns (doomed INT) ALTER TABLE NoColumns DROP COLUMN doomed -- "ALTER TABLE DROP COLUMN failed because 'doomed' is the only data column in table 'NoColumns'. A table must have at least one data column."Sad but (apparently) true . . .
Woody Zenfell III
2010-06-03 19:37:01