الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

محتاج مساعدة في جملة Insert

Featured Replies

بتاريخ:

إلى أعضاء المنتدي الكرام

محتاج مساعدة في شرح هذا الكود


Copy specific columns (and rows) from one table to another:

Insert into postables
 (postable_id, postable_name, dept, auth_name) 
VALUES( 
 (Select postables_seq.nextval),
 (Select 'some static text' postable_name),
 (Select dept      From cost_centres Where cc_code = 123), 
 (Select auth_name From authorisers Where auth_code = 'Z5f')
)
[b]
-- The same as above written to select alias names:[/b]

insert into postables
 (postable_id, postable_name, dept, auth_name)
 (select AA,BB,CC,DD 
 from (Select postables_seq.nextval AA), 
   (Select 'some static text'    BB),
   (Select dept                  CC From cost_centres Where cc_code = 123),
   (Select auth_name             DD From authorisers Where auth_code = 'Z5f'));

بتاريخ:
  • كاتب الموضوع

معقول الكود صعب لدرجة دي
بس أعتقد انه مش بالصعوبة على محترفي أوركل بالموقع ولكن أعتقد أنهم مشغولين........... منتظر الردود

  • بعد 2 أسابيع...
بتاريخ:

1- First the insert statements must be wrote as next to run successfully:

INSERT INTO postables
           (postable_id,
            postable_name,
            dept, auth_name
           )
    VALUES ((SELECT postables_seq.NEXTVAL
               FROM DUAL),
            (SELECT 'some static text' postable_name
               FROM DUAL),
            (SELECT dept
               FROM cost_centres WHERE cc_code = 123), (SELECT auth_name
                                       FROM authorisers WHERE auth_code = 'Z5f')
           );

INSERT INTO postables
           (postable_id, postable_name, dept, auth_name)
  (SELECT aa, bb, cc, dd
     FROM (SELECT postables_seq.NEXTVAL aa
             FROM DUAL),
          (SELECT 'some static text' bb
             FROM DUAL),
          (SELECT dept cc
             FROM cost_centres WHERE cc_code = 123),
          (SELECT auth_name dd
             FROM authorisers WHERE auth_code = 'Z5f'));



2-It is no difference between the 2 statements, their job is one and its inserting rows into a table.

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

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

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

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

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

Account

Navigation

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.