Relačná algebra
The syntax of a SELECT statement is:
                subselect { UNION [ALL] (subselect) }
        [ ORDER BY column [ASC|DESC] {, column [ASC|DESC] } ]
where a subselect has the syntax:
SELECT [ALL|DISTINCT] expression [AS column] {,expression [AS column]}
FROM tablename [corr_name] {, tablename [corr_name] }
[ WHERE search_condition]
[ GROUP BY column {, column} ]
[ HAVING search_condition ]
Note: UNION [ALL] is not supported by Open SQL.
Examples:
        select pno, sno from sp;
        select x.pno, y.sno from p x, s y
        where x.color=’red‘;
        select sum(qty), pno
        from sp
        where sno != ‚s1‘
        group by pno;
The syntax of a CREATE TABLE statement is:
         CREATE TABLE tablename 
        [ ( columnname [format] {, columnname [format] } ) ]
        [ AS subselect ]
        [ WITH with_clause ]
Examples:
        create table sample ( col1 integer, col2 varchar(6), col3 float );
                create table sample as
                select pno, pname, color 
                from p
                where weight > 10; 
        reate table sample (col1 integer) with journaling;
Additional help is available on ‚datatypes‘ and on SELECT.





