How to compare two fields of identical values to different sizes?

Asked

Viewed 275 times

0

I have a database in which have fields with the same name but with different size

inserir a descrição da imagem aqui

I need to pick the field with the larger VARCHAR. How can I do that ?

1 answer

2


I wonder if you wanted to make one SELECT, then just put it on SELECT in large print:

SELECT CNES FROM Table

Or for example if you want to select the two:

SELECT cnes,CNES FROM Table

But I think for reasons like this it would be better to change the name of the column to something easier to distinguish.

EDIT: I didn’t notice it was a question about Oracle SQL, but I guess it’s the same. Correct me if I’m wrong! :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.