Frequently asked questions for self help.
Knowledge base article 123How do I insert a row in database (and how to set a default sort order)
The short answer is you cannot insert rows in database table
Ability Database is a relational database manager and the concept of inserting rows is alien to it's operation (there is no SQL statement to do this). From the database engine's point of view, the question is how to present the records in a given order.
The solution from this perspective is to create a sort order to match the order of records you want. E.g. open a table and select Format/Sort Order.
Also note that best practice when creating a table is to specify a primary key - a field that contains a unique identifier for each record. This is typically a code of some sort. If there is no obvious field, simply add an Incremental field to your table and specify it to be the primary key as follows:
- Open the table and select Format/Table
- Type a new field name - tablenameID is always a good choice - and set type to Incremental
- Click the Format button and set Index to be Primary Key
Note that a table containing a primary key will use this as the default sort order. New records will appear at the bottom of the table but on closing and re-opening the table, the records will be resorted