Relational database queries use a language {SQL language} {Structured Query Language}. Make variable names no more than 31 characters. Declare cursors explicitly. Primary cursors remain open. Secondary cursors close after fetching all rows.
table
In a database, each data structure is a table, with columns and rows. The rows are records, a set of information about one item, and the columns are each attributes of the item.
datatype
Each column has entries all in one datatype. The datatypes are integer, floating point number, fixed length field of n characters, variable length field of characters, bit, binary fixed length field of n characters, money, and date and time. A "null" entry means an unknown entry, not blank or zero.
queries
select column, column, ... from table - retrieves data from columns in the table and displays in the order specified.
select column from table where phrase - phrase sets conditions for selection. The phrase may use symbols such as =, >, <, >=, <=, !=, !>, and !< and may use connectors such as and, or, not, between m and n, is null, is not null, in ( ... ), not in ( ... ), and LIKE ' '. The symbols that can be used in LIKE are % for any string of 0 or more characters, _ for anyone character, [ ] for any single character in a range or set, [^] for any single character not in a range or set.
function
select function from table - runs a function, such as "getdate ()".
order
select column from table order by column - sorts in ascending order.
select column from table order by column desc - sorts in descending order.
group
select column from table group by column, column, ... - makes nested groups.
select column from table group by column having phrase - phrase sets conditions for grouping.
operator
select operator(column) - operators check numbers of entries: count(column), max(column), min(column), sum(column), avg(column).
insert
insert table (column, column, ... ) (column-1-name datatype, ...) values ('x', 'y') - inserts rows into table at the columns specified using the values in order.
update
update table set column, column, ... from table where phrase - modifies one table by updating its rows.
delete
delete table from table where phrase - deletes rows from table.
Exception
EXCEPTION traps errors. Some named exceptions are ZERO_DIVIDE, NO_DATA_FOUND, TOO_MANY_ROWS, VALUE_ERROR, OTHERS (for all errors). For example, EXCEPTION WHEN ZERO_DIVIDE THEN RESULT1 = NULL;. It has no continue.
Mathematical Sciences>Computer Science>Software>Programming>Languages
3-Computer Science-Software-Programming-Languages
Outline of Knowledge Database Home Page
Description of Outline of Knowledge Database
Date Modified: 2022.0224