Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't INSERT into a table with only a primary key 1

Status
Not open for further replies.

Luzian

Programmer
Nov 27, 2005
103
US
I am designing a temporal database.
For whatever odd reason, I need each object to have a table with only one column.

Code:
CREATE TABLE Users
(
	id int NOT NULL IDENTITY PRIMARY KEY
)

Honest to god, this is all I need. If you're curious, my other columns are implimented as separate tables.

Now how do I insert into this table? he SQL syntax I am used to, requires that I have at least one column explicitly set. Normally inserting into a table with an IDENTITY column, you don't explicitly put any value into that column as it should be auto-incrementing. I do not want to use a work-around by putting a dummy column in my table. I hate hacks, work-arounds and unnecissary data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top