-- Table: public.postcodes
-- DROP TABLE public.postcodes;
CREATE TABLE public.postcodes (
postcode varchar(8) NOT NULL,
post varchar(6) NOT NULL,
kencd varchar(3) NOT NULL,
ken varchar(30) NOT NULL,
shicd varchar(4) NOT NULL,
shi varchar(30) NOT NULL,
ku varchar(30),
machi varchar(30) NOT NULL,
status boolean,
remarks text,
/* Keys */
CONSTRAINT postcodes_pkey
PRIMARY KEY (postcode)
) WITHOUT OIDS;
ALTER TABLE public.postcodes
OWNER TO postgres;
ALTER TABLE `tableName` MODIFY `columnName` columnType;
Any difference between this and your query? Why are these ` symbols surrounding the table names and column names?
What is this public. ? the database name?
This is postgres so the queries are different.
The ` symbols are qualifiers for table/column names. These are not required but a lot of query editors will put them in by default. You need them if you have spaces in your table names or if you have a table or column with the same name as a keyword (like 'desc' or 'order').
I think that public is the database name, but am not sure. Check a postgres manual.