Embedded SQL in DBMS

Nadeem Khan
1 min readMay 10, 2021

--

The standard SQL defines the base of SQL command and can be executed from within a program of a programming language such as C, C++, java, COBOL etc. This is called embedded SQL.

How embedded SQL helps?

· This helps our programs to connect to the data base as most of the time when we are programming something then we need some information from data base because we cannot store large amount of data in files, so here we use embedded SQL.

· This helps us to retrieve the data so fast.

How we can do Embedded SQL?

We can do Embedded SQL with the help of cursor

Syntax of using it

1. EXEC SQL

< Embedded SQL statement >

2. EXEC SQL

Connect to the server user < using password >

Using < password >;

Declaring variables in host language ( C, C++, java etc )

EXEC SQL begins declaring section;

Int (integer) credit amount;

EXEC SQL End declare section

What is cursor in SQL?

Cursor is a pointer which can point to the selection to select and behalf of the host language to the relations.

Learn More

--

--

Nadeem Khan
Nadeem Khan

Written by Nadeem Khan

0 Followers

Hello everyone. Thanks for coming here. This is Nadeem. I am a digital marker, a coder, writer.

No responses yet