• Toreador (3/3/2010)


    Aam-624390 (3/3/2010)


    Seems to be a lot missing assumptions.

    Well it seems a reasonable assumption that tblUsers exists, and is a table.

    You then have to guess about data volumes - I thought that since a system generally has more than one user it was reasonable to assume that there were at least 2 rows.

    Having made those assumptions then there could only be one answer - but I'm not sure what the question was meant to demonstrate? Did those who got it wrong just make different assumptions?

    Assumptions above are reasonable but not absolute. "tblAnything" can be a view. System may have many users but under some conditions the table will be empty.

    Author is not able to fix conditions by using either temporary table or some system table (view).

    I think that nobody will argument that there is no sysdatabases and it can be empty. Maybe some Oracle or HisSQL user 😛



    See, understand, learn, try, use efficient
    © Dr.Plch