Skip to content
Advertisement

What are Covering Indexes and Covered Queries in SQL Server?

Can you explain the concepts of, and relationship between, Covering Indexes and Covered Queries in Microsoft’s SQL Server? Answer A covering index is one which can satisfy all requested columns in a query without performing a further lookup into the clustered index. There is no such thing as a covering query. Have a look at this Simple-Talk article: Using Covering

SQL Select where values in List

Is there a way that I can create query against a data source (could be sql, oracle or access) that has a where clause that points to an ArrayList or List? example: Select * from Table where …

efficient way to implement paging

Should I use LINQ’s Skip() and Take() method for paging, or implement my own paging with a SQL query? Which is most efficient? Why would I choose one over the other? I’m using SQL Server 2008, ASP.NET MVC and LINQ. Answer Trying to give you a brief answer to your doubt, if you execute the skip(n).take(m) methods on linq (with

Concatenate multiple rows in an array with SQL on PostgreSQL

I have a table constructed like this : I’d like to query this table to get a result like this : I can’t figure a way to do that. Is that possible? How? Answer This is a Postgres built-in since a few versions so you no longer need to define your own, the name is array_agg(). (this is Postgres 8.4.8).

Advertisement