syntax CAST sql command

0

I'm doing an INSERT through netbeans. I would like to know if anyone can tell me what the correct CAST syntax is when you need to convert two values to the same command.

I tried

insert into (minha tabela) (nome, senha) 
values cast(? as character varying , ? as character varying);
    
asked by anonymous 06.01.2017 / 19:47

1 answer

0

Good afternoon.

I have never seen use cast or convert to convert two fields at the same time. I would convert field by field. For example:

insert into (my table) (name, password) values (cast (? as character varying), cast (? as character varying));

Hugs

    
07.01.2017 / 15:04