Useful tips for everyday
How do I count a column in SQL query? Query to count the number of columns in a table: select count(*) from user_tab_columns where table_name…
Does Azure SQL Database Support CLR? With the Common Language Runtime (CLR) hosted in Microsoft SQL Server (called CLR integration), you can author stored procedures,…
How do I create a series of dates in PostgreSQL? To generate a series of dates this is the optimal way: SELECT t. SELECT day::date…
How do you fix an ambiguous error in SQL? The SQL Machine is confused as to which “Name” out of the two tables you are…
How to execute SQL query on multiple databases? You can use WHILE loop over all database names and inside loop execute query with EXECUTE. I…
What is deadlock and how it occurs? A deadlock occurs when 2 processes are competing for exclusive access to a resource but is unable to…
How do I merge 3 queries in SQL? If you want two more rows, then use UNION ALL. You still kind of have 3 queries…
How fetch data in one-to-many relationship in SQL? How to efficiently retrieve data in one to many relationships Indicate that at least one row in…
What is indexing clustered indexes What are the drawbacks of indexing? Disadvantages of Clustered Index A clustered index creates lots of constant page splits, which…
How to avoid circular reference in entity framework? 4 Answers remove the virtual before each collection of your model (in code first approach) set lazy…