Help for this page

Select Code to Download


  1. or download this
    my $item = db::Inventory::Item->retrieve( 15 );
    if( $item ) {
      $item->quantity( 15 );
    }
    
  2. or download this
    -- Oracle: 
    INSERT INTO my_table 
    ...
    -- Postgres:
    INSERT INTO my_table
    VALUES( nextval( 'my_sequence' ), 'Some Value' );
    
  3. or download this
    --MySQL
    INSERT INTO my_table( seq_field, val_field )
    ...
    INSERT INTO my_table( val_field )
    VALUES ( 'Some Value' );
    SELECT SCOPE_IDENTITY();
    
  4. or download this
    my $newRecord = db::Table->create( { val_field => 'Some Value' } );