Store Procedure - Sql Statements with Joins and Create and Update a table in Database

Hi I have this 2 tables.
STAB
LTAB

STAB can Have one or more LTAB info
STAB_id is the common field

I would like to create a query that will insert and overwrite a existing table
database name is DB_NAME
and the Table Name that is created is STABLTAB_TAB

I would like to run the stored procedure and a query is ran and the results of the query gets inserted into the STABLTAB_TAB.

or is there another way? thanks
Thank you in advance for your help

Here are some tips about how to help others help you.

2 Likes

Please show us what you have tried and where are you stuck at.