范式一:
 每一列数据单一

    二:
 尽力与主键直接相关

    三:
 主键尽量体现表中内容

 

  删除系列
 
 truncate table score → 全部清空表里面一丝不剩不会产生日志文件
 
 drop database 数据库名 → 删除数据库;
 
 delete from 表名 → 删除表内数据且保留标的格式;
 
 drop table 表名 → 删除整个表;
 
 delete from 表名 where 列名=‘ ’→ 删除符合单引号里面信息的那一行;
 
 alter table 表名 drop column 列名 → 修改表删除列;
 
 
 
         修改系列
 
 alter table 表名 add 列名 数据类型 → 修改表添加列;
 
 update 表名 set 列名=' ' → 修改这一列全部的数据;
 
 update 表名 set 列名=‘ ’ where 列名=‘ ’→ 修改满足后面单引号条件的那一行;
 
 update 表名 set 列名 = XX where 列明 between 80 and 100 → 80到100之间的范围性修改
 
 
 
          插入数据
 
 insert into 表名 values() → 插入表的数据
 
 insert into 表名 (列名,列名) values( ,' ') → 插入前面两列的数据;

 

 

    查询语句
 
 select *from 表名 → 查询表里的数据
 
 select 列明,列明 from 表名 → 查询两列数据
 
 select 列明,列明 from 表名 where 列明=‘要查的名字’→ 按条件查询数据,前面两列
 
 selere *from 表名 where 列名=‘条件’ and 列名 =条件 → 条件查询
 
 selere *from 表名 where 列名 in (,,,)
 
 selecr *from 表名 where 列明 between 80 and 100 → 范围型查询
 
 select distinct 列名 from 表名 → 针对一列去重显示
 
 select *from 表名 where 列名 like '%宏' → 模糊查询 通配符%表示任意很多字符:
 
 select *from 表名 where 列名 like '_宏' →      下划线表示任意一个字符:
 
 selrcr *from 表名 order by 列名 asc → 查询 asc 是升序
 
 selrcr *from 表名 order by 列名 desc → 查询 desc 是降序
 
 selrcr *from 表名 order by 列名,列名 (升序或者是降序),列名 (升序或者是降序)→ 对两列进行排序

 select top 3 *from 表名 order by 列名 desc → 查询 降序的前三名
 
 select top 3 *from 表名 order by 列名 asc → 查询 升序的前三名
 
 select  列名 from 表名 group by 列名
                          分组:把一列里面相同的分为一组
 select 列名 from 表名 where 列名='X'

 逻辑运算符:or=或者    
              and=并且   
         in=代表在魔偶些参数之内都符合条件,相当于多个or 
         not=修饰的作用,比如(not in)就是代表不在这个范围之内的
                  between= (berween 数字 and 数字) 表示在某个范围之内,相当于>= , <=
                all= 查询一列当作参数使用

 数学运算符:  +-*/%   
 赋值运算符:  =
 比较运算符: > , < ,<= ,>= ,!= ,=