1.增加字段 alter table docdsp add dspcodechar(200)2.删除字段 ALTER TABLE table_NAME DROP COLUMNcolumn_NAME3.修改字段类型 ALTER TABLE table_name ALTER COLUMNcolumn_name new_data_type4.sp_rename 改名 EXEC sp_rename '[dbo].[Table_1].[filedName1]…
select * from g_members where id between '16' and '31' order by id desc 倒序排列 select * from g_members_thirdparty where uid in(select id from g_members where mobile='13438342547') select * from g_members where email in (select DISTINCT email from g_me…
distintct: 查询结果排除了重复项(合并算一项)--如查姓名 select distinct ReaName from UserInfo 分页语句:(查询区间时候应该查询出行号,作为分页的依据,row_number() ) select top 5 * from ( select row_number() over (order by UserId) as RowNumber, * from UserInfo --新表 作为A表 ) A where RowNumber…
整形参数判断 1.直接加' 2.and 1=1 3. and 1=2 如果1.3运行异常 2正常就存在注入 字符型判断 1.直接加' 2.and '1'='1' 3. and '1'='2' 搜索型: 关键字%' and 1=1 and '%'='% 关键字%' and 1=2 and '%'='% 如果1.3运行异常 2正常就存在注入 获取数据库版本 and (select @@version)>0 获取当前数据库名 and db_n…