易截截图软件、单文件、免安装、纯绿色、仅160KB

这个SQL语句怎么写?

1,表class中的字段c_id与stu表中的s_cid为关联字段
2,返回字段 c_name,s_no,s_name
3,查询条件:c_stu字段值大于20,并且s_no第二到四位是“006”这三个字符
4,查询结果按s_no倒排序
表中字段名不重复,字段名前不用加表名

这样写怎么错了?
select c_name,s_no,s_name from class,stu where c_id = s_cid and c_stu>20
select c_name,s_no,s_name from class,stu where c_id = s_cid and c_stu>20 and s_no like '?006*' order by s_no desc
错哪里了?

select c_name,s_no,s_name from class,stu where c_id=s_cid and c_stu>20 and s_no like '?006*' order by s_no desc

select [class].c_name,stu.s_no,stu.s_name from [class],stu where[class].c_id = stu.s_cid and stu.c_stu>20

select [class].c_name,[stu].s_no,[stu].s_name from [class],[stu] where [class].c_id=[stu].s_cid and [class].c_stu>20 and [sut].s_no like '_006%' order by [stu].s_no desc


相关问答:

关于group by的sql语句?

  with adod_dict do
    begin
    close;
    commandtext:='select bgqxcode,count(*) wjsl from wscl_wsda_file where wjnd=:tnd group by bgqxcode'; ......

总会碰到怪的问题,sql问题

sql2005
select *from v_ddxx where d_sfsc='0' and (g_ssbm='1001' or g_ssbm='1002') and (xxf>0 and  xxfwzf <>0 ),执行速度慢的要死,但是如果把(xxf>0 and  ......

csv文件转换成sql导入到数据库,没有数据为何?

执行的顺序:
1)文件浏览框(选择文件使用)
选择好文件后
点击一个导入按钮的时候 ,把上面上传框里的csv文件以一个ID为文件名,上传到**/**文件夹下
2)读取这个文件夹下的csv的文件,转换成sql
3 ......

oracle sql developer 查询显示中文乱码

环境:1.win2003server+oracle9i
2.oracle9i字符集为AMERICAN_AMERICA.WE8ISO8859P1
3.oracle sql developer版本 1.5.5
现象描述: 1.在sql developer 中查询oracle中的某个表,中文全部显示为乱码。 ......

SQL字段,横向展开

请问各位,如何将SQl中,某字段中的值横向展开呢,
CASE WHEN

具体问题具体分析,看你要怎么展开

姓名  科目      成绩
张三  英语    90
李四  英语&nb ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号