xref: /OpenGrok/opengrok-indexer/src/test/resources/sources/sql/test.sql (revision 2bcacabbe843448903326d34ff21a265b5f37596)
1CREATE TABLE foo (
2   col1 INT NOT NULL PRIMARY KEY,
3   col2 VARCHAR(100)
4);
5
6SELECT * FROM foo;
7
8INSERT INTO foo (col1, col2) VALUES (1, 'something'), (5, 'something else');
9
10-- This is an SQL comment with a email address: username@example.com
11DELETE FROM foo WHERE id=5;
12
13SELECT COUNT(col1) FROM foo;
14
15-- This en an SQL comment with strange characters: <, > and &
16DROP TABLE "foo";
17
18CREATE TABLE "foo""";
19
20/* Other supported comment */
21SELECT 123.45 + 543E-2 FROM DUAL;
22
23/* /* Comment inside comment */ */
24
25-- Text values:
26INSERT INTO foo(col2) VALUES ('this'), ('and this'), ('and '' too');
27