sql²éѯÓï¾ä
ÁÐ1 ÁÐ2 ÁÐ3
Q1 1 1
Q2_1 2 2
Q2_2 2 2
Q2_3 2 2
Q31_1 4 4
Q444_3 5 5
Q444_5 5 5
ÎÒÏë²éѯ½á¹ûÊÇ£º
Q1 1 1
Q2_1 2 2
Q31_1 4 4
Q444_3 5 5
SQL code:
SELECT MIN(ÁÐ1) ,ÁÐ2,ÁÐ3 from TB GROUP BY ÁÐ2,ÁÐ3
SQL code:
---²âÊÔÊý¾Ý---
if object_id('[tb]') is not null drop table [tb]
go
create table [tb]([col1] varchar(6),[col2] int,[col3] int)
insert [tb]
select 'Q1',1,1 union all
select 'Q2_1',2,2 union all
select 'Q2_2',2,2 union all
select 'Q2_3',2,2 union all
select 'Q31_1',4,4 union all
select 'Q444_3',5,5 union all
select 'Q444_5',5,5
---²éѯ---
select *
from tb t
where not exists(
selec
Ïà¹ØÎÊ´ð£º
½«Ò»¸ö±í21~30ɾ³ý£¬sqlÓï¾äÔõôд
Õâ¸öÌ«ÁýͳÁË£¬ÊÇÅÅÐòºóµÄµÚ21Ìõµ½30Ìõ¼Ç¼ɾ³ý»¹ÊÇijһÁÐÖµÔÚ21µ½30Ö®¼äµÄɾ³ý°¡£¿
21-30ÊÇʲôÒâ˼£¿×ֶεϰ¾Ídelete from table1 where col1>=21 and col1<=30
Ö¸µ ......
Ö´ÐеÄ˳Ðò£º
1£©Îļþä¯ÀÀ¿ò£¨Ñ¡ÔñÎļþʹÓã©
Ñ¡ÔñºÃÎļþºó
µã»÷Ò»¸öµ¼Èë°´Å¥µÄʱºò £¬°ÑÉÏÃæÉÏ´«¿òÀïµÄcsvÎļþÒÔÒ»¸öIDΪÎļþÃû£¬ÉÏ´«µ½**/**Îļþ¼ÐÏÂ
2£©¶ÁÈ¡Õâ¸öÎļþ¼ÐϵÄcsvµÄÎļþ£¬×ª»»³Ésql
3 ......
select convert(varchar(50),cast(convert(numeric(18,2),1275674000000/100000000)as real))+'ÒÚ'
select cast(convert(numeric(18,2),1275674000000/100000000)as real)
ΪʲôÉÏÒ»¸öÓÃvarcharת»»ºó¾ÍÖ»±£ÁôÁËÒ ......
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
ΪÁËÂú×ãÊý¾Ý²éѯµÄËÙ¶ÈÎÊÌ⣬ÎÒ½«Ò»ÕÅÊý¾ÝÁ¿´óµÄѧÉú±í°´Äê¶È·Ö³É¶à¸ö±í
students_2008, students_2009È»ºóÎÒÓÖ×öÁËÒ»¸öÄ£°å±ístudents_template,Ä£°å±íÖеÄ×ֶκÍstudents_2008, students_2009Ò»Ñù£¬Ö»²»¹ýÊÇÒ»¸ö ......