My table has the columns latitude and longitude in float8 type. I want to generate a geometry column from these two columns. I make the following query in the SQL Window of the DB Manager in QGIS.
ALTER TABLE populated_places
ADD geographyColumn AS geography::STGeomFromText('POINT('+convert(varchar(20),latitude)+' 'convert(varchar(20),longitude)+')',4326)
I get the following error: syntax error at or near "AS"
How can I solve this problem?