Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to insert an empty line to SQL table? [duplicate]

Possible Duplicate:
Inserting rows into a table with one IDENTITY column only

I have a SQL table with just one column. Column is an autoincrement field like:

Id INT IDENTITY 

I need to insert a rows to this table (this is a bulk/dummy table temporarily):

INSERT INTO my_table VALUES () 

But I'm got a syntax error.

How can I do this?

like image 594
Oomph Sonar Avatar asked Nov 28 '12 12:11

Oomph Sonar


People also ask

How do I add a new line in a table in SQL?

-- Using both \r\n SELECT 'First line. \r\nSecond Line. ' AS 'New Line'; -- Using both \n SELECT 'First line.


1 Answers

INSERT INTO my_table DEFAULT VALUES  
like image 100
gbn Avatar answered Sep 18 '22 09:09

gbn