SQL Flashcards

1
Q

Datatypes?

A

char(n),varchar(n),integer,raw/blob,clob,date

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to create a table?

A

create table variable(variable data attribute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

how to add data?

A

insert into VARIABLE(data,data)
values(x,x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to slect?

A

select x,x
from Variable, variable
where m=”given”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

delete syntax?

A

delete variable
where variable> x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is distinct

A

prevent elimination

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

update syntax

A

update variable
set this=this

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Types of SQL

A

Sorting, duplication elimination, relationalgebra,tupelvariable, operation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

sorting

A

order by??desc/asc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Aggregation functions

A

count() sum(),min()max()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

IN operator

A

retrieve all data/table where the values is there

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

quantiziert - exist

A

select x
from x
where exists

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

why is correleated better as korrelierted

A

it is more independent and more efficient as it is execute once

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

between and in?

A

between x and x;
in(x,x,xx);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

explain “%”,”;”,”_”

A

%-belieb zeilen lieke,sname like T%ccc;

_genau 1 zahl

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

case construct

A

(case when x =ml then x
when x= fl theb z
else m end)

13
Q

Arten von Joins

A

cross join, natural join,join or inner join, left outer join or right outer join,full outer join.
union join

14
Q

advantage of sicht

A

datenschutz,generalisierung, verringerung der Komplexitat

15
Q

A table is changeable when?

A

a primary key is present
no aggregate function
no group by having,distunt,union

16
Q

how to put in order?

A

order by what,asc