Navigation: Developing Apps > BINETIX® AGE™ API > Plugins > Database Drivers > TDS DB Driver > Functions
insert/3
Description
insert/3 is an Erlang function exported by "tds" module..
Prepares and executes an INSERT statement.
The function internally calls execute/4 with default parameters.
References
•execute/4
Parameters
Name
Type
Handle
integer()
Database handle.
Table
atom()
Table name specified as an atom, not a string.
Fields
[]
List of {Name, Value} tuples of the record's fields, where Name is an atom, Value is a term.
Result
Value or Type
{sql_result, []}
Code Sample
> tds:insert(123456789, users, [{user_id, 1025}, {user_name, "Peter"}]).