Closed
Description
The following set of SELECT queries should each return 77 rows since there is no WHERE clause in any of the queries. Yet you can see that I get a different number of records back depending on the list of fields I am selecting, as though there was an implicit " | Unique" at the end of the line:
PS V:\Publish\KWeinrich\Storage> (invoke-sqlquery "SELECT * FROM JunctionPointTargets").count
77
PS V:\Publish\KWeinrich\Storage> (invoke-sqlquery "SELECT Server FROM JunctionPointTargets").count
12
PS V:\Publish\KWeinrich\Storage> (invoke-sqlquery "SELECT Server,Share FROM JunctionPointTargets").count
20
PS V:\Publish\KWeinrich\Storage> (invoke-sqlquery "SELECT Server,Share,DirectoryName FROM JunctionPointTargets").count
77
This table has an index of "Server, Share, DirectoryName, FileName" - but that shouldn't matter for how many rows the above queries return. But there are only 12 unique servers, and only 20 unique Server/Share combinations.
Note: All queries return 77 records, as expected, when run in SQLyog.
(I am running the queries against a MySQL 8.0.36 server, using SimplySql 2.0.2.70, Open-MySqlConnection)
Metadata
Metadata
Assignees
Labels
No labels