Help for this page

Select Code to Download


  1. or download this
    sqlite> create table foo (foo int, bar int);
    sqlite> insert into foo (foo, bar) values (1,1);
    sqlite> insert into foo (foo, bar) values (1,2);
    sqlite> insert into foo (foo, bar) values (1,3);
    
  2. or download this
    sqlite> select * from foo where foo = 1 and bar in (1,2,3);
    1|1
    1|2
    1|3
    
  3. or download this
    my $sth = 
    $dbh->prepare('select * from foo where foo = $1 and bar in ($2)');
    $sth->execute(1, [1,2,3]);