Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

cannot cast type numeric to boolean postgresql

ALTER TABLE products
  ALTER power_price DROP DEFAULT
 ,ALTER power_price TYPE bool USING (power_price::int::bool)
 ,ALTER power_price SET NOT NULL
 ,ALTER power_price SET DEFAULT false;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #cast #type #numeric #boolean #postgresql
ADD COMMENT
Topic
Name
5+7 =