Karteikarten
SQL
Karten in diesem Stapel (37)
- 1SQLSimple query language used for accessing, handling and managing data in relational databases
- 2Data DictionaryFile containing metadata
- 3MetadataData about data
- 4DDLData Definition Language provides set of definitions to specify the storage structure and access methods used by database systems
- 5DMLData Manipulation Language lets users access or manipulate data as organised by data model
- 6DCLData Control Language controls access to database
- 7Data typeKind of value a field will contain
- 8Procedural DMLrequires user to specify what data is needed and how to get it
- 9Non Proceduralrequires user to specify what data is needed without specifying how to get it
- 10creating a tableCREATE TABLE tablename(column datatype,...)
- 11Constraintcondition or check applicable on a field or set of fields
- 12DEFAULT constraintsets a default value in case no value is entered
- 13CHECK() constrainttable constraint
CHECK(column IN(---,---,---)); - 14Relational operators=,>,<,>=,<=,<>
- 15Logical OperatorsAND,OR,NOT
- 16comparison operator for NULLIS
statement IS NULL - 17avg()to calculate average value of the column specified
- 18min()to find minimum value in the column
- 19max()to find maximum value in the column
- 20sum()find total value of the column
- 21stddev()to find standard deviation of the column
- 22count()to count no of non null values in a column
- 23count(*)count total no of rows in a relation
- 24variancecalculate variance of values in a column
- 25order of SELECT statementSELECT
FROM
WHERE
GROUP BY
HAVING
ORDER BY - 26Display word in lowercaseSELECT LOWER('WORD') FROM DUAL;
- 27display word in upper caseSELECT UPPER('WORD') FROM DUAL;
- 28to repeat a char-expressionselect replicate('word',no_of_times) from dual;
- 29to display a sub string from a stringselect substr('word',startpos,no_of_char) from dual;
- 30to display current system dateselect getdate() from dual;
- 31Cartesian productno_of_rows1*no_of_rows2
- 32table aliasselect ___ from name x, name y;
x and y aliases - 33Equi-joinjoin in which columns are compared for equality
- 34Natural joinsame column exists in both tables
- 35UNIONshows each distinct row from both tables removing duplicates
select * from a union select * from b
to display duplicates
select * from a union all select * from b - 36Rules of UNIONorder by only at end of union statement;
group by/having with individual select statements - 37Rule for drop tableTable with rows can't be dropped
Informationen
- Beschreibung
- ACT Year 12 Certificate Computer Science Karteikarten am SQL, erstellt von Banoshree Bose am 22/03/2016.
- Erstellt von
- Banoshree Bose
- Aufrufe
- 0
- Bewertung