-- kate: hl SQL (Oracle)
-- test case shipped with highlighting in bugzilla, LGPL

declare
  v_nchar NCHAR(12);
<beginfold id='1'>begin</beginfold id='1'>
	q'{adfasdf'sadfasdf j}'{' hkjhkhkjhkjh khlkhklj'fghdfghdfgh'hkjh'jkhkh'a'
	nQ'(asldflahsl;'dkjfhklsdfh)'
	Nq'[asdasd;'asdasd'a]sd'asd'asasd]';11111111[1']; asdasdasdasd'errrrrrrrrrrrrrr-p

	nq'agdfgsdfgfhfghjfgh'f'f'sdfg'sdfg'dfg#a' dafdfadasfasdf;
	v_nchar := n'NCHAR STRING';
	if_n := 0;

	Q'#gdfgsdfgsdfgsdfgsdfg#' afgasasdfasdfasfasdfasdfasdfasdfsdf

	<beginfold id='2'>if</beginfold id='2'> sldfjsdj then
		<beginfold id='3'>case</beginfold id='3'>
			when 1=1 then
				aslfjsldkfj;
			when 2=2 then
				asdfg;
			else
				null;
		<endfold id='3'>end case</endfold id='3'>;

		<beginfold id='2'>if</beginfold id='2'> sdfjh then
			for i in 1 .. 2
			<beginfold id='4'>LOOP</beginfold id='4'>
				dbms_output.put_line(q';ololo;');
			<endfold id='4'>END Loop</endfold id='4'>;

			while true
			<beginfold id='4'>loop</beginfold id='4'>
				dbms_output.put_line('1111');
			<endfold id='4'>end loop</endfold id='4'>;
		<endfold id='2'>end if</endfold id='2'>;
		ksjfklasjd;
		fklj;
	elsif
		sdklfjsdklfj;
	else
		sdfdfsdf;
	<endfold id='2'>end if</endfold id='2'>;
<endfold id='1'>end</endfold id='1'>;

CREATE TABLE Persons (
    ID int NOT NULL,
    LastName varchar(255) NOT NULL,
    FirstName varchar(255),
    Age int,
    City varchar(255),
    CONSTRAINT CHK_Person CHECK (Age>=18 AND City='Sandnes')
);
