08-06-18, 11:42 PM
(آخر تعديل لهذه المشاركة : 09-06-18, 12:01 AM {2} بواسطة atefkhalf2004.)
من فضلكم
هناك جدول moneys
به حقل primary key ولكن لا يضيف قيمة زيادة تلقائية
كيف اغير خصائص الحقل لتصبح
identity تصبح yes حتي identity increment 1
SavInto77.CommandText = "ALTER TABLE moneys " "
conn.Open() '''''moncod PK_moneys
SavInto77.ExecuteNonQuery()
conn.Close()
حاولت الاول احذفه
ظهرت الرسالة
هناك جدول moneys
به حقل primary key ولكن لا يضيف قيمة زيادة تلقائية
كيف اغير خصائص الحقل لتصبح
identity تصبح yes حتي identity increment 1
SavInto77.CommandText = "ALTER TABLE moneys " "
conn.Open() '''''moncod PK_moneys
SavInto77.ExecuteNonQuery()
conn.Close()
حاولت الاول احذفه
ظهرت الرسالة
PHP كود :
The object 'PK_moneys' is dependent on column 'moncod'.
Msg 4922, Level 16, State 9, Line 1
ALTER TABLE DROP COLUMN moncod failed because one or more objects access this column.
PHP كود :
ALTER TABLE moneys DROP column moncod