sql基本语法

sql基本语法

查询

多表查询

  1. 直接多表查询

   

select * from st_profiles,st_score_report

上面的语句将会产生两个表的笛卡尔乘积,其中大部分数据是冗at余的。

  1. 解决方案1
    通过主键相等,去除冗余元素
select * from st_profiles,st_score_report where st_profiles.sno=st_score_report.sno
  1. 解决方案2
enter code here

distinct

去除相同结果,返回无重复元素的集合

select distinct dept from st_profiles ;
select dept  from st_profiles

 

enter description here
enter description here

 

ARM的工作模式

原文地址:https://www.cnblogs.com/Howbin/p/10788576.html