1. How to join a table with like : in one table we have data "CANADA" and in another table we have data "abc CANADA". Now i want to apply a join using like clause.
Define based on business rulex. 1. Not Null : a. Doesnot allow any Null values. b. Can be define at column level only. 2. Default : a. Filled with default value if we donot provide any value b. There is no restriction for the no of default value in one table. 3. Check : a. Allows only a valid range of values b. Can be define at column level or table level. c. Can be define at one column only ( not more than one column) d. Cannot be define on composite key 4. Unique : a. Doesnot allow duplicate value b. ...
1. When will ROW_NUMBER and RANK give different results? Give an example. 2. Is it possible for LEFT JOIN and FULL OUTER JOIN to produce the same results? Why or why not? 3. Why would I use DENSE_RANK instead of RANK? What about RANK instead of DENSE_RANK? 4. What happens if I GROUP BY a column that is not in the SELECT statement? Why does this happen? 5. LAG and LEAD are especially useful in what type of scenarios? 6. For dealing with NULL values, why would I choose to use IFNULL vs. CASE WHEN? 7. Do temp tables make your code cleaner and faster, one of the two, or none? Why? 8. When is a subquery a bad idea? A good idea?
Comments
Post a Comment