s***s 发帖数: 1841 | 1 SQL里select有什么办法ignore case么?
Thx! |
a****s 发帖数: 47 | 2 What part do you want to ignore? In mysql, if I define a field like char(5),
the case are ignored. select * from table01 where name ="a"; is the
same as select * from table01 where name ="A";
【在 s***s 的大作中提到】 : SQL里select有什么办法ignore case么? : Thx!
|
s***s 发帖数: 1841 | 3 what part? what do u mean?
我就是要search database,但是希望search的时侯ignore case,
不关大写小写,指要字母一样就可以选中。
我在用sqlplus,要怎么设?
【在 a****s 的大作中提到】 : What part do you want to ignore? In mysql, if I define a field like char(5), : the case are ignored. select * from table01 where name ="a"; is the : same as select * from table01 where name ="A";
|
a****s 发帖数: 47 | 4 In mysql, you can use text(or blob, I forgot which one) to define the field
where you want to ignore case.
【在 s***s 的大作中提到】 : what part? what do u mean? : 我就是要search database,但是希望search的时侯ignore case, : 不关大写小写,指要字母一样就可以选中。 : 我在用sqlplus,要怎么设?
|
xt 发帖数: 17532 | 5
SQL natually ignores case, as with SQL92
【在 s***s 的大作中提到】 : what part? what do u mean? : 我就是要search database,但是希望search的时侯ignore case, : 不关大写小写,指要字母一样就可以选中。 : 我在用sqlplus,要怎么设?
|
s***s 发帖数: 1841 | 6 ft
at least that's not true for this sqlplus
【在 xt 的大作中提到】 : : SQL natually ignores case, as with SQL92
|
xt 发帖数: 17532 | 7
In this case, you can convert everything into uppercase. dont know
hwo to do it.
【在 s***s 的大作中提到】 : ft : at least that's not true for this sqlplus
|
m******t 发帖数: 2416 | 8 Usually in server settings you can set case sensitive or insensitive.
I know you can do this on SQL Server, Sybase, and Oracle(not 100% sure
for this one). Check out your server settings bah.
【在 s***s 的大作中提到】 : ft : at least that's not true for this sqlplus
|
s*f 发帖数: 20 | 9 不知道你解决了没有
你用sqlplus那么应该是oracle的
有一个办法是把比较的双方转为小写, 比如
SELECT id, name FROM EMP WHERE lower(NAME) = lower('Socks');
I saw another solution for Oracle. But I didn't pay attention
because the above is enough for my applications.
【在 s***s 的大作中提到】 : SQL里select有什么办法ignore case么? : Thx!
|
b***e 发帖数: 4591 | 10 I set btitle and ttitle
so every page has the title,
how to delete the title now? |
|
|
p*****e 发帖数: 58 | 11
Don't understand your question
【在 b***e 的大作中提到】 : I set btitle and ttitle : so every page has the title, : how to delete the title now?
|
b***e 发帖数: 4591 | 12 do u know the command of btitle and ttitle?
they set title in the bottom or top of one page,
but after I set it,
every page has its title.
now want to cancel the title,
what can I do then?
thanks
【在 p*****e 的大作中提到】 : : Don't understand your question
|
W****S 发帖数: 6555 | 13 set them to " "
【在 b***e 的大作中提到】 : do u know the command of btitle and ttitle? : they set title in the bottom or top of one page, : but after I set it, : every page has its title. : now want to cancel the title, : what can I do then? : thanks
|
a*****i 发帖数: 4391 | 14 say I have a table
create table test
(
id int,
name text
);
how do I get the names of the biggest 10 ids?
Thanks! |
D****N 发帖数: 430 | 15 hehe.. if it's MSSQL you can always
SELECT text
FROM test
WHERE id IN
(SELECT TOP 10 id
FROM test)
【在 a*****i 的大作中提到】 : say I have a table : create table test : ( : id int, : name text : ); : how do I get the names of the biggest 10 ids? : Thanks!
|
b****e 发帖数: 1275 | 16 select top 10 id from test order by id desc
【在 a*****i 的大作中提到】 : say I have a table : create table test : ( : id int, : name text : ); : how do I get the names of the biggest 10 ids? : Thanks!
|
a*****i 发帖数: 4391 | 17 This is what I am using now on postgresql:
select id from test order by name limit 10;
I posted the question on the newsgroup last night and got 5 answers this morning. |