SQL サーバーの複数テーブルの関連付けの大文字と小文字を区別するクエリの更新または削除

	select daima,ziDuan from TB_Test01 
	ORDER BY daima asc
	
	select codes,zhiDuan from CanShu 
	--WHERE codes collate Chinese_PRC_CS_AS='A'  --区分大小写查询
	ORDER BY codes asc
	
	update p set p.zhiDuan=r.ziDuan from CanShu p,TB_Test01 r where p.codes collate Chinese_PRC_CS_AS=r.daima collate Chinese_PRC_CS_AS --关联修改更新

 delete p from tab_1 p,tab_2 r where p.t1_id=r.t1_id and (p.t1_name is null or p.t1_name='');--关联删除

おすすめ

転載: blog.csdn.net/wybshyy/article/details/130509885