随笔 - 71  文章 - 15  trackbacks - 0
<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

因为口渴,上帝创造了水;
因为黑暗,上帝创造了火;
因为我需要朋友,所以上帝让你来到我身边
Click for Shaanxi xi'an, Shaanxi Forecast
╱◥█◣
  |田|田|
╬╬╬╬╬╬╬╬╬╬╬
If only I have such a house!
〖总在爬山 所以艰辛〗
Email:myesjoy@yahoo.com.cn
NickName:yesjoy
MSN:myesjoy@hotmail.com
QQ:150230516

〖总在寻梦 所以苦痛〗

常用链接

留言簿(3)

随笔分类

随笔档案

文章分类

文章档案

Hibernate在线

Java友情

Java认证

linux经典

OA系统

Spring在线

Structs在线

专家专栏

企业信息化

大型设备共享系统

工作流

工作流产品

网上购书

搜索

  •  

最新评论

阅读排行榜

评论排行榜

				
						
								
										
SQL >   create   table  t (id  number   primary   key );
 表已创建。
 SQL
>   create   table  t1 (id  number , tid  number constraint  fk_t1_t_id  foreign   key  (tid)
  
  references  t (id)); 表已创建。
 SQL
>   insert   into  t  values  ( 1 );
 已创建 
1  行。
 SQL
>   insert   into  t1  values  ( 1 1 );
 已创建 
1  行。
 SQL
>   commit ;
 提交完成。
 SQL
>   delete  t;
delete  t * ERROR 位于第  1  行:ORA - 02292 : 违反完整约束条件 (YANGTK.FK_T1_T_ID)  -  已找到子记录日志
SQL
>   alter   table  t1  drop   constraint  fk_t1_t_id; 表已更改。
 SQL
>   alter   table  t1  add   constraint  fk_t1_t_id  foreign   key  (tid)  references  t (id)  on   delete   cascade ;

表已更改。 SQL
>   delete  t;
 已删除 
1  行。
 SQL
>   select   *   from  t;
 未选定行
 SQL
>   select   *   from  t1;
 未选定行
 SQL
>
drop   table  T_ES_Equipment  cascade  constraints;
drop   table  T_ES_AnalysisTestCenter  cascade  constraints;
create   table  T_ES_AnalysisTestCenter (
    id 
varchar2 ( 32 not   null ,
    brief_introduction 
varchar2 ( 255 ),
    analysis_test_center_name 
varchar2 ( 50 ),
    remark 
varchar2 ( 255 ),
    
primary   key  (id)
);
create   table  T_ES_Equipment (
    id 
varchar2 ( 32 not   null ,
    school_id 
varchar2 ( 255 ),
    upload_time date,
    equip_id 
varchar2 ( 50 ),
    accessories 
varchar2 ( 3255 ),
    alias 
varchar2 ( 50 ),
    application 
varchar2 ( 3255 ),
    certificate 
varchar2 ( 50 ),
    CHNNAME 
varchar2 ( 100 ),
    classification 
varchar2 ( 50 ),
    ENGNAME 
varchar2 ( 100 ),
    analysis_test_center_id 
varchar2 ( 32 ),
    
primary   key  (id)
);
alter   table  T_ES_Equipment 
    
add   constraint  FK57481928D651B652 
    
foreign   key  (analysis_test_center_id) 
    
references  T_ES_AnalysisTestCenter;
posted on 2006-10-09 13:39 ★yesjoy★ 阅读(335) 评论(0)  编辑  收藏 所属分类: 数据库设计

只有注册用户登录后才能发表评论。


网站导航: