Forum

Write a PL SQL to c...
 
Share:
Notifications
Clear all

Write a PL SQL to count the locations, where the various departments are located and print the number.


Posts: 1
Guest
Topic starter
(@Rahul U)
New Member
Joined: 4 years ago

Please check the attachment for additional information.

3 Replies
Posts: 47
Guest
(@Sambit S)
Eminent Member
Joined: 4 years ago

Write a PL SQL to count the locations, where the various departments are located and print the number.

Try this one.

To count the locations, where the various departments are located and to print the number.  

Declare
V_cnt number:=0;
Begin
Select count(distinct loc_id) into v_cnt
From department;

Dbms_output.put_line('Number of location are '||v_cnt);

End;
Reply

Self Learning Video Tutorials - Software Course

Posts: 17
(@rahul)
Active Member
Joined: 4 years ago

getting this error

 
Reply
1 Reply
(@sandeshk)
Joined: 4 years ago

New Member
Posts: 1

@rahul can I please get the exact query for that.

Reply

Leave a reply

Author Name

Author Email

Title *

 
Preview 0 Revisions Saved
Share: