Domino Code Fragment

Code Name*
Sampling of SQL Statements that Can Be Used with Notes
Date*
04/29/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.218.70.93
Description*
SQL commands that can be used with Notes?
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
Problem:
What SQL commands can be used with Notes?

Solution:
Notes 3.x

Notes 3.x supports only the SELECT SQL command. Sample SELECT statements are listed
below. The SQL command can be used in Notes 3.x via @DbCommand formulas.

Sample SELECT Statements:

SELECT ALL FROM table

SELECT FROM table WHERE search-condition

SELECT FROM table GROUP BY columnid, columnid

SELECT FROM table HAVING

SELECT FROM table ORDER BY columnid DESCENDING

Notes 4.x

Notes 4.x supports the SELECT command (as listed above) as well as additional SQL commands
such as those listed below. In Notes 4.x, SQL statements can be used in @DbCommand formulas
and in LotusScript code (using the LotusScript Data Object).

Sample SQL Statements:

INSERT INTO tablename (columnid, columnid) VALUES (value, value)

UPDATE tablename SET columnid = value WHERE search-condition

ALTER TABLE tablename {ADD columnid datatype}

CREATE INDEX indexname ON tablename (columnid ASC, columnid DESC)

CREATE TABLE tablename (columnid datatype)

CREATE VIEW viewname (columnid, columnid) AS SELECT ...

DELETE FROM table

DELETE FROM table WHERE column = value

DROP INDEX indexname

DROP TABLE tablename

DROP VIEW viewname