巴拿赫病故于1945 年8 月31 日。他的出生年份恰好是他在世时某年年
龄的平方,问:他是哪年出生的?
查看答案
Question 7: Can you tell me what the difference of two SQL statements at
performance of execution?
Statement 1:
if NOT EXISTS (select * from publishers where state = 'NY')
begin
SELECT 'Sales force needs to penetrate New York market'end
else
begin
SELECT 'We have publishers in New York'
end
Statement 2:
if EXISTS (select * from publishers where state = 'NY')
begin
SELECT 'We have publishers in New York'
end
else
begin
SELECT 'Sales force needs to penetrate New York market'
end
Question4:Can you create a cross-tab report in my SQL Server!
How can I get the report about sale quality for each store and each quarter
and the total sale quality for each quarter at year 1993?
You can use the table sales and stores in datatabase pubs.
Table Sales record all sale detail item for each store. Column store_id is the id of
each store, ord_date is the order date of each sale item, and column qty is the
sale qulity. Table stores record all store information.
I want to get the result look like as below:
Output:
stor_name Total Qtr1 Qtr2 Qtr3 Qtr
4
---------------------------------------- ----------- ----------- ----------- -----------
-----------
Barnum's 50 0 50 0 0
Bookbeat 55 25 30 0 0
Doc-U-Mat: Quality Laundry and
Books 85 0 85 0 0
Fricative Bookshop 60 35 0 0 25
Total 250 60 165 0 25
Question6: How can I add row numbers to my result set?
In database pubs, have a table titles , now I want the result shown as
below,each row have a row number, how can you do that?
Result:
line-no title_id
----------- --------
1 BU1032
2 BU1111
3 BU2075
4 BU7832
5 MC2222
6 MC3021
7 MC3026
8 PC1035
9 PC8888
10 PC9999
11 PS1372
12 PS2091
13 PS2106
14 PS3333
15 PS7777
16 TC3218
17 TC4203
18 TC7777
哪个VIEW用来判断 tablespace的剩余空间