![]() ![]() INDEX vehicles_auto_index_fk_city_ref_users (city ASC, owner_id ASC) This command opens an interactive SQL shell to a temporary, multi-node in-memory cluster with the movr database preloaded and set as the current database.Ĭrdb_region public.crdb_internal_region NOT VISIBLE NOT NULL DEFAULT default_to_database_primary_region(gateway_region())::public.crdb_internal_region,ĬONSTRAINT users_pkey PRIMARY KEY (city ASC, id ASC)ĬOMMENT ON TABLE ers IS 'This table contains information about users.' ĬONSTRAINT vehicles_pkey PRIMARY KEY (city ASC, id ASC), To follow along, run cockroach demo with the -nodes and -demo-locality flags. For more information about the MovR example application and dataset, see MovR: A Global Vehicle-sharing App. The following examples use MovR, a fictional vehicle-sharing application, to demonstrate CockroachDB SQL statements. The CREATE statement for the database, function, table, view, or sequence. The name of the table, view, or sequence. Show the CREATE statements for all types in the current database. Show the CREATE statements for all schemas in the current database. The ALTER statements follow the CREATE statements to guarantee that all objects are added before their references. As a result, SHOW CREATE ALL TABLES also returns the ALTER statements that add, modify, and validate an object's constraints. This option is intended to provide the statements required to recreate the objects in the current database. Show the CREATE statements for all tables, views, and sequences in the current database. The name of the database, function, table, view, or sequence for which to show the CREATE statement. SHOW CREATE object_name opt_show_create_format_options ALL SCHEMAS TABLES TYPES Parameters Parameter
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |