Home : General : Databases and SQL :

General: Databases and SQL: Create an inital record in table when installing: Edit Log

Here is the list of edits for this post
Create an inital record in table when installing
This sounded easy, but I think I am doing it wrong.

I want to create an inital (default) record in a table when it is first created. Do I have to do this with a seperate ADD statement, or can this be done in the CREATE somehow?

This particular table should only ever have one record in it... so I dont want to really ADD another row, just set the first one if it does not already exist.

Does that make sense?

Many thanks!


Edit: I have semi solved this just be checking the number of rows, and if less than 1, doing an update on the table....


http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

Ian: Jun 6, 2002, 12:14 PM

Edit Log: