ALTER TABLE assets ALTER COLUMN asset_no TYPE INT USING asset_no::integer; ALTER TABLE assets ALTER COLUMN location TYPE VARCHAR, ALTER COLUMN description TYPE VARCHAR; alter table temp_runner_orders_v2 alter column distancefixed type float USING distancefixed::double precision; -- alter table temp_runner_orders_v2 alter column durationfixed type int USING durationfixed ::integer ; -- ALTER TABLE temp_runner_orders_v2 ALTER COLUMN pickuptimefixed TYPE DATE USING to_date(pickuptimefixed , 'YYYY-MM-DD');
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter