Understanding Rows

Rows are used to store TimesTen data. TimesTen supports several data types for fields in a row.

  • One-byte, two-byte, four-byte and eight-byte integers.

  • Four-byte and eight-byte floating-point numbers.

  • Fixed-length and variable-length character strings, both ASCII and Unicode.

  • Fixed-length and variable-length binary data.

  • Fixed-length fixed-point numbers.

  • Time represented as hh:mi:ss [AM|am|PM|pm].

  • Date represented as yyyy-mm-dd.

  • Timestamp represented as yyyy-mm-dd hh:mi:ss:ffffff.

The Data Types section in the Oracle TimesTen In-Memory Database SQL Reference contains a detailed description of these data types.

To perform any operation for inserting or deleting rows, the user must have the appropriate privileges, which are described along with the syntax for all SQL statements in the SQL Statements chapter in the Oracle TimesTen In-Memory Database SQL Reference.

The following sections describe how to manage your rows:

Inserting Rows

To insert a row, issue INSERT or INSERT SELECT. You can also use the ttBulkCp utility.

The following example demonstrates how to insert a row in the table customer.

Command> INSERT INTO customer VALUES(23125, 'John Smith';

Note:

When inserting multiple rows into a table, it is more efficient to use prepared commands and parameters in your code. Create indexes after the bulk load is completed.

Deleting Rows

To delete a row, issue the DELETE statement.

The following example deletes all the rows from the table customer for names that start with the letter "S."

Command> DELETE FROM customer WHERE cust_name LIKE 'S%';