How do you select multiple columns from a table while ensuring that one specific column doesn't contain duplicate values?
SELECT DISTINCT col1,col2,col3,col4 from table
This doesn't work, because DISTINCT here applies to all columns so columns as a whole are distinct. But I want a single column to have distinct values.
Claude has always had issues with Windows, it prefers MacOS or Linux environments. You can see that with how badly it handles PowerShell commands and the fact up until recently tried using BASH commands in Windows.... That was with both Claude CLI and Claude Desktop. It does work well with a WSL environment to a degree. Not sure if these issue are fully resolved, but given the article I wouldn't be surprised if it hasn't.
Question
Code149
How do you select multiple columns from a table while ensuring that one specific column doesn't contain duplicate values?
This doesn't work, because DISTINCT here applies to all columns so columns as a whole are distinct. But I want a single column to have distinct values.
I'm using SQL Server. :)
Link to comment
https://www.neowin.net/forum/topic/974024-sql-select-multiple-columns-with-only-one-distinct-column/Share on other sites
6 answers to this question
Recommended Posts