teto_t بتاريخ: 30 أبريل 2009 تقديم بلاغ مشاركة بتاريخ: 30 أبريل 2009 create table departments(dept_id number(4) constraint d_id praimary key, dept_name varchar2(30) constraint d_name not null, manager_id number(4) , loc_id number(3) constraint d_locid foreign key references locations(loc_id)); create table locations(loc_id number(3) constraint location_id primary key, adrres varchar2(30) constraint add_nn not null); اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
TROYMAN بتاريخ: 30 أبريل 2009 تقديم بلاغ مشاركة بتاريخ: 30 أبريل 2009 عفواً بس وين رسالة الخطأ... اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
mustafagamiel بتاريخ: 30 أبريل 2009 تقديم بلاغ مشاركة بتاريخ: 30 أبريل 2009 (معدل) create table departments(dept_id number(4) constraint d_id primary key, dept_name varchar2(30) constraint d_name not null, manager_id number(4) , loc_id number(3)constraint d_locid REFERENCES locations(loc_id) ) راجع الماتريل فقط ستجد هنا بعض الاخطاء البسيطةالخطأ في الجدول الاول والثاني صحيح تم تعديل 30 أبريل 2009 بواسطة mustafagamiel اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
miash80 بتاريخ: 3 مايو 2009 تقديم بلاغ مشاركة بتاريخ: 3 مايو 2009 create table departments(dept_id number(4) constraint d_id praimary key, dept_name varchar2(30) constraint d_name not null, manager_id number(4) , loc_id number(3) constraint d_locid foreign key references locations(loc_id)); create table locations(loc_id number(3) constraint location_id primary key, adrres varchar2(30) constraint add_nn not null); اخي العزيز انتا عامل في الجدول الاول References للجدول لسى مش موجود وهو locationsثانيا خذها نصيحة من اخوك دائما انشاء الجداول ثم اكتب القيود احسن واوضح يعني هيك .create table locations ( loc_id number(3), adrres varchar2(30) not null); alter table locations add constraint locations_pk primary key(loc_id ) ); وبعدين الجدول الثاني create table departments( dept_id number(4), dept_name varchar2(30) not null, manager_id number(4) , loc_id number(3) ); alter table departments add constraint departments_pk primary key(dept_id ); alter table departments add constraint departments_Fk foriegn key(loc_id ) refernces locations (loc_id ); إن شاء الله اكون وصلت الفكرة اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
Recommended Posts
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.