Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
SQL Commands
alter schema
Schema Creation
Create Schema
Schema Manipulation
Alter Schema
Declare Schema
Default Schema
Drop Schema
Open Schema
Close Schema
Undeclare Schema
Table Creation
Create Table
Table Manipulation
Alter Table
Drop Table
Declare Table
Undeclare Table
Lock Tables
Create Index
Drop Index
View Creation
Create View
View Manipulation
Drop View
Declare View
Undeclare View
Data Manipulation
Insert
Delete
Select
Update
Additional SQL Statements
Grant
Revoke
Commit
Rollback
Exec
Set Database
Set Mode
Set Transaction
Set Network
Nested Queries
SQL Functions
Union
Where Conditions
RIS Datatypes
SQL code
Description
char[acter](n)
CHARACTER
int[eger]
INTEGER
smallint
double
[precision]
SMALLINT
DOUBLE
real
REAL
DECIMAL
TIMESTAMP
ris_blob(n)
RIS_BLOB
ris_text(n)
RIS_TEXT
alter table
alter table <table> add <riscolumn> <datatype>[not null]
[extern <dbmscolumn>];
close schema
close schema {<schema> [, ...] } | ALL;
commit
commit [work] [ for <schema> ];
create index
create [unique] index <risindex>
extern <dbmsindex> on <ristable>
(<riscolumn> [, ...]);
create schema
SQL String
decimal[(p[, s])
timestamp
create table
create table <ristable> ({<riscolumn> <datatype>
[not null] }[, ...]) [extern <dbmstable>
{<dbmscolumn> [, ...])]];
create view
create view <risview> [(<column-list>)]
[extern <dbmsview>[(<dbmscolumn-list>)] as
<select-statement>;
declare table
declare table [<schema>.] <table> ({<riscolumn>
<datatype> [not null]}[, ...]) [extern
[<dbmsuser>.<dbmstable>[ (dbmscolumn> [, ...])]]
[with [partial] verify option];
declare view
declare view [<schema>.]<view> ({<riscolumn>
<datatype>[not null]}[, ...]) [extern
[<dbmsuser>.]<dbmsview>[(<dbmscolumn>
[, ...])]] [with [partial] verify option];
declare schema
declare schema <schema>.[<passwd>] [user<username>
[.<passwd>]] [osuser <osusername>[.<passwd>]];
default schema
default schema <schema>[.<passwd>];
delete
delete from [<schema>.] <relation>
[where <conditions>];
drop index
drop index <index>;
drop schema
drop schema <schema> [.<passwd>][force];
drop table
drop table <table>;
drop view
drop view <view>;
exec
exec <database-type> <string>;
insert
insert into [<schema>.] <relation> [(<column-list>)]
values (<values-list>);
--OR-insert into [<schema>.] <relation> [(<column-list>)]
<select-statement>;
lock tables
lock tables [{[<schema>.]<table>}[, ...] in share mode]
[{[ <schema> .] <table> }[, ...] in exclusive mode]
[{[ <schema> .] <table> }[, ...] in default mode];
open schema
open schema <schema> [, ...];
rollback
rollback [work] [for <schema> ];
select
select [all | distinct] <column-list> from <relation-list>
[ where <conditions>]
[ group by <column> [,...] ]
[ having <conditions>]
[ order by {<column> | <num> [{asc | desc}]}
[, ... ];
set database
set database enable [all | only <database> [, ...] ];
set mode
set mode [ansi {on | off}] [verify {on | off}]
[blank strip {on | off}] [autorename {on | off}];
set network
set network verification
[timestamp interval <value>,]
[initial timeout <value>,]
[timestamp tolerance <value>,]
[buffer full size <value>,]
[buffer full timeout <value>,]
[response interval <value>]
[for <schema> [,...]];
set transaction
set transaction autocommit {on | off };
undeclare schema
undeclare schema [ALL | <schname1, schname2, ...>];
undeclare table
undeclare table [<schema>.] <table>;
undeclare view
undeclare view [<schema>.] <view>;
union
<select-statement> union [all] <select-statement>
[union [all] <select-statement] [ ... ];
update
update [<schema>.]<relation> set
{<column> = <value>} [, ...] [where <conditions>];
where
where <condition>;
The condition identifier consists of one of the following:
<condition> <boolean> <condition>
not <condition>
<expr> <comparison-op> <expr>
<expr> [not] between <expr> and <expr>
<expr> [not] in (<value-list>)
<column> is [not] null
<char column> [not] like <wildcard-string>
<nested-query>
Nested Query
<expr> <comparison-op> all (<select-statement>)
<expr> <comparison-op> any (<select-statement>)
<expr> <comparison-op> some (<select-statement>)
[not] exists (<select-statement>)
<expr> [not] in (<select-statement>)
SQL Functions
count(*)
--OR-{avg | max | min | sum | count} (distinct <column>)
--OR-{avg | max | min | sum} ([all <expr>)
--OR-user
--OR-current_timestamp