I have a table with columns Client, vendor, vendor 2. How can I make the Client column unique by making it primary key.
Can I use alter table command inside table transformer macro?
Hi @Kuber V ,
Please clarify your case for me to check - you want the Client column to be unique without any duplicates? To serve like a kind of UID for each table entry?
Maybe we can just add the number of the current row to the contents of each cell in the Client column?
For example, you have John Smith both in the second and in the forth rows of your table, but they are different people and belong to different vendors. So, we'll rename them as John Smith_2 and John Smith_4.
you want the Client column to be unique without any duplicates? To serve like a kind of UID for each table entry?
- yes this is exactly what I want. As I'm using this table for other operations with other tables also having the Client column.
I know we can do something like jhon-smith2, that is what I am doing currently. But this client column is being populated by multiple users and I want a constraint to prevent users from entering duplicate client names
Maybe the UUID function will do for the case?
SELECT UUID(T1.'Col 1') AS 'UID', * FROM T*
This works. Thanks!
It looks like you're new here. Sign in or register to get started.