[ library(mysql) | ]
sql_insert(+Table, ++Attributelist, ++Valuelist)
Insert tuple into database
- Table
- Atom or string
- Attributelist
- List of atoms or strings
- Valuelist
- List of ground terms
Description
Inserts a tuple into the relation Table. The tuple is specified by
Attributelist, which is the list of attribute names, and Valuelist,
which is the list of corresponding values to be inserted.
Both lists must be of the same length.
Fail Conditions
Tuple cannot be inserted
Resatisfiable
no
Examples
% insert a person into relation 'Adressen'
?- sql_insert('Adressen',['Id','Vorname','Name'],
[113,'Karl','Krause']).
yes.
See Also
sql_delete / 5