Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0613· OpenAIAi2 WildChat-4.8M (AI2)

CREATE TABLE country ( id SERIAL PRIMARY KEY NOT NULL, code VARCHAR(10) UNIQUE NOT NULL,…

  1. User

    CREATE TABLE country ( id SERIAL PRIMARY KEY NOT NULL, code VARCHAR(10) UNIQUE NOT NULL, name VARCHAR(100) NOT NULL, description VARCHAR(180), population BIGINT, area BIGINT, create_date TIMESTAMP NOT NULL, update_date TIMESTAMP, update_by INTEGER NOT NULL );

    i want a schema json for my table

  2. Assistant

    { "type": "object", "properties": { "id": { "type": "integer" }, "code": { "type": "string", "maxLength": 10, "unique": true }, "name": { "type": "string", "maxLength": 100 }, "description": { "type": "string", "maxLength": 180 }, "population": { "type": "integer", "minimum": 0 }, "area": { "type": "integer", "minimum": 0 }, "create_date": { "type": "string", "format": "date-time" }, "update_date": { "type": "string", "format": "date-time" }, "update_by": { "type": "integer" } }, "required": ["id", "code", "name", "create_date", "update_by"] }

  3. User

    i mean generate a sample data with the given columns

  4. Assistant

    [ { "id": 1, "code": "US", "name": "United States", "description": "The United States of America", "population": 331002651, "area": 9629091, "create_date": "2022-10-01T10:30:00Z", "update_date": "2022-10-02T11:45:00Z", "update_by": 12345 }, { "id": 2, "code": "GB", "name": "United Kingdom", "description": "The United Kingdom of Great Britain and Northern Ireland", "population": 67886011, "area": 242900, "create_date": "2022-10-03T14:20:00Z", "update_date": null, "update_by": 67890 }, { "id": 3, "code": "JP", "name": "Japan", "description": "Japan", "population": 126476461, "area": 377930, "create_date": "2022-10-04T09:15:00Z", "update_date": "2022-10-05T16:55:00Z", "update_by": 54321 } ]