Switch to: V9V8V7V6V5

LEXICAL TOKENS

Comments

Valentina SQL supports both single line and multi-line comments.

Single Line Comments

Valentina SQL supports single line comments using SQL92 and C++ style formatting. This comment applies to everything up to the next, new line symbol.

SELECT f1, f2, f3	-- this is SQL92 comment	 
FROM T		        // this IS C++ style comment
WHERE f1 < 100

Multi-Line Comments

Valentina SQL supports also multi line comments that allow you to comment across several linese. Multi line comments cannot be nested. However you can nest single line comments inside of multi-line comments.

SELECT f1, SUM(f2) AS 'sum_f2'
FROM T		
/* WHERE f1 < 100	
GROUP BY f1             // single line comment
HAVING sum_f2 = 55 */

IDENT

: { LETTER | _ | @ } { LETTER | ‘_’ | DIGIT }*

DELIMETED

If you want to include spaces in the identifier, then you should wrap it by double quotes.

“name of persone” – SQL92

Please note, [name of persone] is not supported anymore (since v.8.0).

You can use double quotes inside a delimiter then you should “escape” them:

“name \”of\” persone”

or

“name ”“of”” persone”

UINT

Valentina SQL supports unsigned numbers:

123	     123.456	123.456e12	123.456e-12		
                .456	   .456e12	   .456-e12	

String Literals

To include a string literal as a constant, wrap in single quotes.

‘this is a string literal‘

If a string literal appears inside single quotes, then you can use one of these two ways:

‘this is Peter’’s hat‘

‘this is Peter\’s hat‘	

‘this is C:\\disk\\games‘

The Valentina SQL parser will join two string literals into single string if they follow one after the next and only use spaces to separate them:

‘abcde’   ‘fgh‘	 	=>	‘abcdefgh‘ 

String literal can contains non-english characters. The parser extracts string as is and then passes them to the SQL engine.