WEB开发网
开发学院数据库MSSQL Server 某外企SQL Server面试题 阅读

某外企SQL Server面试题

 2007-05-17 09:38:26 来源:WEB开发网   
核心提示: 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 ea

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    Qtr4    
---------------------------------------- ----------- ----------- ----------- ----------- -----------
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

Answer 4:用动态SQL实现

Question5: The Fastest Way to Recompile All Stored Procedures

I have a problem with a database running in SQL Server 6.5 (Service Pack 4). We moved the database (object transfer) from one machine to another last night, and an error (specific to a stored procedure) is cropping up. However, I can't tell which procedure is causing it. Permissions are granted in all of our stored procedures; is there a way from the isql utility to force all stored procedures to recompile?

上一页  1 2 3 4 5  下一页

Tags:外企 SQL Server

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接