الانتقال إلى المحتوى

Create A Table With Dynamice Name


Youssef Mohamed

Recommended Posts

Al salamo 3alikom game3an

dh awel mwdo3 lya hena w ya rab ykon 7d 3ndo el 7l

3ayz a3ml create le table with dynamic name

y3ny Create Table Dynamic table name
as select *
from dynamic_Table_name

ana grbt keda

Create table
(Select table_Name || '1' from all_Tables where table_name = 'GL_JE_HEADERS)
as select *
from
(Select table_Name || '1' from all_Tables where table_name = 'GL_JE_HEADERS')

bs daiman bydeny Invalid option

3la fekra i am ready to help anyone lw fe 7aga 3yzha just send me here a request or email me to [email protected]

thanks in advance

رابط هذا التعليق
شارك

السلام عليكم...
الحل هو استخدام عبارة Execute Immediate :


declare
TableName varchar2(20);
begin Select table_Name || '1' into TableName from all_Tables where table_name = 'GL_JE_HEADERS';
execute immediate 'create table '||TableName||' as select * from '||emp; end;
/

رابط هذا التعليق
شارك

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   تمت استعادة المحتوى السابق الخاص بك.   مسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

جاري التحميل
×
×
  • أضف...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية