Untitled Deck Flashcards

(14 cards)

1
Q

What is Autocommit Mode?

A

Every individual SQL statement is treated as a transaction and is automatically committed when it finishes.

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

Do you need to explicitly start or end a transaction in Autocommit Mode?

A

No, you don’t need to explicitly start or end a transaction.

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

What is Implicit Transactions Mode?

A

SQL Server automatically starts a new transaction after the previous one is committed or rolled back.

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

What must you do in Implicit Transactions Mode?

A

You need to explicitly commit or rollback the transaction.

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

How is Implicit Transactions Mode enabled?

A

This mode must be enabled explicitly.

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

What is Explicit Transactions Mode?

A

You use BEGIN TRANSACTION, COMMIT, and ROLLBACK statements manually.

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

What control does Explicit Transactions Mode provide?

A

It gives full control over when the transaction starts and ends.

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

What happens to each individual statement in transactions?

A

Each individual statement is a transaction.

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

How is a transaction started in SQL?

A

Each transaction is explicitly started with the BEGIN TRANSACTION statement.

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

How is a transaction ended in SQL?

A

Each transaction is explicitly ended with a COMMIT or ROLLBACK statement.

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

What happens when a transaction completes?

A

A new transaction is implicitly started when the previous transaction completes.

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

What are the benefits of TRY and CATCH statements?

A

Exceptions provide a clean way to check for errors without cluttering the code.

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

How do exceptions signal errors?

A

Exceptions provide a mechanism to signal errors directly instead of using side effects.

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

Can exceptions be checked during compilation?

A

Yes, exceptions can be seen by the programmer and checked during the compilation process.

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