New syntax for checking single record in DB

2

Checking single record is present in DB without data transfer from DB to application layer.

 

 

 

SPFLI table content.

1

Initially there was no way of checking if a record is present in DB or not but instead we use SELECT SINGLE * or up to 1 rows in SQL query. This statement transfers a single record or a single column  value from DB to the application server memory. Now we have a new SQL syntax that checks if a record is present in the DB or not without data transfer. 

SAMPLE CODE- WHERE condition fully specified key

3

OUTPUT

4

SAMPLE CODE- WHERE condition fully specified key but record not present

5

OUTPUT

6

SAMPLE CODE- WHERE condition partially specified key

7

OUTPUT

8


 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s