By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,488 Members | 2,552 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,488 IT Pros & Developers. It's quick & easy.

SQL: INSERT INTO without specifying any column

P: n/a
Hi there!
I need to write an sql statement, that inserts a blank (empty) row into a
table.

I tried
"Insert Into tabname",
"Insert Into tabname () VALUES ()"
"Insert Into tabname VALUES ()"
"Insert Into tabname VALUES"
....

But nothing worked.

As I am writing classes to access databases, I do not know any field-name
when inserting a blank row.
There is an autovalue - column (identity), which I use to identify the new
row.

Any idea, how a statement can insert a blank line?

Regards
Alex

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
A blank row is one that contains a Null value in every row. To explicitly
insert a null into a column, you can simply use the word Null, so just include
one column explicitly, and use (Null) for the VALUES clause.

Example:
INSERT INTO tblFoo (FirstFooColumn) VALUES (NULL)

On Fri, 19 Dec 2003 08:36:03 +0100, "Alexander" <ab****@gmx.net> wrote:
Hi there!
I need to write an sql statement, that inserts a blank (empty) row into a
table.

I tried
"Insert Into tabname",
"Insert Into tabname () VALUES ()"
"Insert Into tabname VALUES ()"
"Insert Into tabname VALUES"
...

But nothing worked.

As I am writing classes to access databases, I do not know any field-name
when inserting a blank row.
There is an autovalue - column (identity), which I use to identify the new
row.

Any idea, how a statement can insert a blank line?

Regards
Alex


Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.