Obtain number of bits from two simultaneous fields with bit_length () in SQL

0

How can I get the number of bits in two fields in sql with Bit_Length() .

I have a table with four fields I want to print all fields but only two get the number of bits

id, name, birthday and surnames, I want the 4 fields but I want name and surnames the number of bits

    
asked by Gerardo Bautista 28.06.2018 в 06:49
source

1 answer

1

If your tabla had the fields: id , nombre , apellidos and cumple .

It would be enough:

SELECT id, BIT_LENGTH(nombre), BIT_LENGTH(apellidos), cumple FROM tabla;

Do you have complications with that sentence?

    
answered by 28.06.2018 в 12:19