PL/SQL Flashcards

1
Q

Basic LOOP

A

LOOP

EXIT WHEN

END LOOP

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

For LOOP

A

FOR cont IN 1..100
LOOP

END LOOP

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

While LOOP

A

WHILE
LOOP

END LOOP

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

Compound queries, SET operators

A

UNION
UNION ALL
INTERSECT
MINUS

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

JOIN tables

A

INNER

OUTER

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

SQLERRM, come si usa?

A

Nelle eccezioni per stampare il messaggio di errore

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

Qual’è la differenza tra INSTR e SUBSTR?

A

INSTR estrae l’indice di inizio della stringa ricercata

SUBSTR estrae la stringa

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

Semijoin

A

Where exists

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

Come gestire gli errori in pl/sql

A
DECLARE
...
BEGIN
...
EXCEPTION
WHEN exception1 THEN
...
WHEN exception2 THEN
...
WHEN others THEN
...
END;
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Cosa sono i Constraints

A
This is the most common Oracle Interview Questions asked in an interview. Constraints are the rules defined over data. Named constraint for a primary key can be added in two ways:
1. During table creation:
CREATE TABLE Employees (
Eid int NOT NULL,
Name varchar(255) NOT NULL,
Salary number(8),
Age int,
CONSTRAINT PK_ID PRIMARY KEY (Eid)
);
  1. In the Alter statement
    ALTER TABLE Employees
    ADD CONSTRAINT PK_ID PRIMARY KEY (Eid);
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Null in equality expression

A

Si usa IS NULL e non

= NULL

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

Nested table

A

Specifico data type che contiene record di una tabella

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

VARRAY

A

Varray

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

Operatore q[]

A

Q[]

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

Tipi di istruzioni SQL

A

The five types of SQL statements are:

Data Definition Language (DDL): CREATE, DROP, RENAME, ALTER, TRUNCATE

Data Manipulation Language (DML): INSERT, DELETE, UPDATE, MERGE

Data Control Language (DCL): GRANT, REVOKE

Data Retrieval: SELECT

Transaction Control Statements: COMMIT, SAVEPOINT, ROLLBACK

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

Null in query

A

https: //www.toptal.com/sql/interview-questions
https: //asktom.oracle.com/pls/apex/asktom.search?tag=not-in-operator-with-null-data

17
Q

Sql%rowcount

A

Come si usa