473,498 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL: INSERT INTO without specifying any column

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
1 11990
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2827
by: LRW | last post by:
I'm sorry, I don't know if this is a mySQL issue, or a Putty error, or what. So if there's a better newsgroup for this question, please let me know. I'm using Putty to SSH into our remote Linux...
2
23051
by: schumacker | last post by:
Hi everyone! I am working with Delphi v7 and MS SQLServer. I am trying to insert data in a table with a SQL sentence. Some of the fields of my table are type char or varchar, and they can have...
2
4011
by: a | last post by:
NEW Post Here's my best guess at how to insert this dataset.... the code runs, but no new records are added to the sql table. I've read and split a delimited text file into a dataset. It...
2
2739
by: .Net Newbie | last post by:
Hello, I am somewhat new to .Net and currently working on an intranet site using C# going against SQL Server 2k. I am accepting personal information on a single webform and trying to insert the...
1
7439
by: shearichard | last post by:
Hi - I have written some python to insert a row into a table using MySQLDB. I have never before written SQL/Python using embedded parameters in the SQL and I'm having some difficulties. Could...
138
59064
by: Ian Boyd | last post by:
i've been thrown into a pit with DB2 and have to start writing things such as tables, indexes, stored procedures, triggers, etc. The online reference is only so helpful. The two pdf manuals are...
24
19859
by: clare at snyder.on.ca | last post by:
I have a SQL query I need to design to select name and email addresses for policies that are due and not renewed in a given time period. The problem is, the database keeps the information for every...
6
3836
by: polocar | last post by:
Hi, I'm writing a program in Visual C# 2005 Professional Edition. This program connects to a SQL Server 2005 database called "Generations" (in which there is only one table, called...
4
22678
by: cognosqueen | last post by:
I need to create a view of a sql table, but change the data types. I know the syntax below is not correct, and can't figure out if it is wrong or if you just can't do this. I have only created...
0
7004
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7167
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7208
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6890
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5464
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1423
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
292
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.