بتاريخ: 30 يناير 200521 سنة comment_25961 insert into (select employee_id, last_name, email, hire_date, job_id, salary, department_id from employees where department_id = 50 ) values ( 99999, 'Taylor', 'Dtaylor' , to_date('07-jun-99','dd-mon-rr'), 'ST_CLERK' , 5000 , 50); السادة الكرام .. هل منكم من يدلنى على فائدة جملة where فى الجملة السابقة .. أنا شايف ان ملهاش لازمة !!!؟؟؟على فكرة المثال موجود فى introduction to oracle9i: SQL 8-23 تقديم بلاغ
بتاريخ: 31 يناير 200521 سنة comment_26048 as u saidthis condition is not meanfull in this case,but i think they make it 2 mention u that u can use this condition WITH CHECK OPTION in the next example may B anyway, "introduction to oracle9i: SQL" had some little mistakes:Ckeck NVL2 convert function description syntax P(3-48) u'll find another mistakeempr3 is the value returned if expr2 is nullso it had 2B expr1 instead of expr2another oneCheck P(6-15), last lineALL means less than the maximum. >ALL means grator than the minimum>Correct it toALL means less than the minimum. >ALL means grator than the maximum>ALSO ANOTHER BAAAD ONE @ Page No 4-31Joins - Comparing SQL: 1999 to Oracle SyntaxNon-Equi-Join ---> Join Usingso it had 2B Join ON instead of Join USING تقديم بلاغ
بتاريخ: 31 يناير 200521 سنة comment_26053 The first statement will insert all those record whose deparment id = 50 Second statement will create one record onlyremoving where clause from select statement will insert all record تقديم بلاغ
بتاريخ: 1 فبراير 200521 سنة comment_26246 ولكن - على حد علمي - أن أي عملية لإدخال لسجل باستخدام VALUES cluse: INSERT INTO ([i]table | view | subquery[/i]) VALUES ([i]expr | constant[/i] ) فإنه يدخل سجل واحد فقط.فالمثال الموضح أعلاه insert into (select employee_id, last_name, email, hire_date, job_id, salary, department_id from employees where department_id = 50 ) values ( 99999, 'Taylor', 'Dtaylor' , to_date('07-jun-99','dd-mon-rr'), 'ST_CLERK' , 5000 , 50); يطابق تماماًINSERT INTO employees (employee_id, last_name, email, hire_date, job_id, salary, department_id) VALUES( 99999, 'Taylor', 'Dtaylor' , to_date('07-jun-99','dd-mon-rr'), 'ST_CLERK' , 5000 , 50); ولكن إذا كان المراد إدخال أكثر من سجل في آن واحد، يمكن إستخدام ال subquery بدون VALUES كالآتي:INSERT INTO ( table | view | subquery ) SUBQUERYوالله أعلم،،، تقديم بلاغ
بتاريخ: 17 فبراير 200521 سنة comment_27738 أخي الفاضل insert into (select employee_id, last_name, email, hire_date, job_id, salary, department_id from employees where department_id = 50 ) values ( 99999, 'Taylor', 'Dtaylor' , to_date('07-jun-99','dd-mon-rr'), 'ST_CLERK' , 5000 , 50); المثال هنا غير واضح نوعا ما واستخدامه في غير هذا الموضع أفضل .. لكن المقصود هنا أن ال where clause هنا سوف يجبر اليوزر على ادخال البيانات التي تحقق هذا الشرط بمعنى أنه لو أن اليوزر حاول أن يضع رقم 80 بدلا من 50 فلن يتم ادخاله الى قاعدة البيانات والله أعلم .. أسأل الله لنا ولكم العلم النافع والعمل الصالح أخوكم // اوراكل نجد تم تعديل 17 فبراير 200521 سنة بواسطة Oracle^Man تقديم بلاغ
بتاريخ: 17 فبراير 200521 سنة comment_27740 Where ليس لها أي اهمية في المثال المذكور ولن تؤثر على النتيجة تقديم بلاغ
بتاريخ: 19 فبراير 200521 سنة comment_27880 السلام عليكم ورحمة الله وبركاته،، this condition is not meanfull in this case,but i think they make it 2 mention u that u can use this condition WITH CHECK OPTION :bro. Oracle^Manلكن المقصود هنا أن ال where clause هنا سوف يجبر اليوزر على ادخال البيانات التي تحقق هذا الشرط بمعنى أنه لو أن اليوزر حاول أن يضع رقم 80 بدلا من 50 فلن يتم ادخاله الى قاعدة البيانات your mention was right ONLY if u use WITH CHECK OPTION Clauseinsert into (select employee_id, last_name, email, hire_date, job_id, salary, department_id from employees where department_id = 50 WITH CHECK OPTION) values ( 99999, 'Taylor', 'Dtaylor' , to_date('07-jun-99','dd-mon-rr'), 'ST_CLERK' , 5000 , 50); تم تعديل 19 فبراير 200521 سنة بواسطة عروة تقديم بلاغ
بتاريخ: 19 فبراير 200521 سنة comment_27889 السلام عليكم ورحمة الله وبركاتهأعتقد أن select employee_id, last_name, email, hire_date, job_id, salary, department_id from employees where department_id = 50 ما هو إلا view ولكن بدلا من كتابة اسم الـview تم كتابة الجملة كاملةوبالتالى فإنه لا يمكن عمل insert لـrow لن تراه ال viewأى أن الجملة المفروض كالتالى create view test as select employee_id, last_name, email, hire_date, job_id, salary, department_id from employees where department_id = 50 ; ثم بعد ذلك insert into test values ( 99999, 'Taylor', 'Dtaylor' , to_date('07-jun-99','dd-mon-rr'), 'ST_CLERK' , 5000 , 50); أرجو من الله أن أكون فاهم صحنفعنا الله وإياكم بالعلم النافعأدرى بأن هناك فجرا .. وأن بعد العسر يسرالكنهم ساموا الفتى وبلاده عسفا وقهراوالعالم الحيران يشهد ما يحل بأمتىوأنا هنا .. فى غربتى .. فى لوعتىأبكى وأمسح فى ذهول دمعتى وأظل أنظر للسماء .. والقلب يخفق بالدعاءيارب .. أوقظ أمتى تقديم بلاغ
بتاريخ: 19 فبراير 200521 سنة comment_27894 أخي h_elshawafوعليكم السلام ورحمة الله وبركاته،، كل عمليات اللإدخال العادية تستخدم الصيغة التالية:( INSERT INTO ( table | view | subquery بعد ذلك إذا كنت عاوز تدخل سجل واحد فقط محدد بقيم معينة في هذه الحالة تستخدم VALUE Clause.......INSERT INTO ( table | view | subquery VALUES ولكن إذا كان المراد إدخال أكثر من سجل في آن واحد، يمكن إستخدام ال subquery بدلا من VALUES كالآتي:INSERT INTO ( table | view | subquery ) SUBQUERY والمثال الموضح أعلاه: موجود فى introduction to oracle9i: SQL 8-23يستتخدم الصيغة التالية:INSERT INTO subquery VALUESوليستINSERT INTO view VALUESإذا فإن عملية الإدخال الموضحة أعلاه صحيحة 100% - بغض النظر عن وجود الـWHERE Clauseأرجو أكون أفدتكم تم تعديل 19 فبراير 200521 سنة بواسطة عروة تقديم بلاغ
بتاريخ: 5 أبريل 200521 سنة comment_32115 where condition ليس له أي تأثير في جملة الــ insert المكتوبة تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.