文件名称:SQL Server 数据库实用SQL语句
文件大小:45KB
文件格式:PDF
更新时间:2024-01-05 04:42:26
select SQL SQL
–查看指定表的外键约束 select * from sysobjects where parent_obj in( select id from sysobjects where name=’表名’) and xtype=’PK’ –查看所有表 select * from sysobjects where xtype=’PK’ –删除列中含数字的 delete news where patindex(‘%[0-9]%’,title)>0 –删除删去 字段 title值重复的行,且只保留 id 较小的这个 delete news where exists(select 1 from news t