Keyspace qualifier
Sometimes issuing a USE
statement to select a keyspace is inconvenient.
Connection pooling requires managing multiple keyspaces.
To simplify tracking multiple keyspaces, use the keyspace qualifier instead of the USE
statement.
You can specify the keyspace using the keyspace qualifier (dot notation) in these statements:
-
-
To specify a table when you are not located in the keyspace that contains the table, specify the name of the keyspace followed by a period, then the table name. For example,
cycling.race_winners
, wherecycling
is the keyspace andrace_winners
is the table name.INSERT INTO cycling.race_winners ( race_name, race_position, cyclist_name ) VALUES ( 'National Championships South Africa WJ-ITT (CN)', 1, { firstname:'Frances', lastname:'DU TOUT' } ); INSERT INTO cycling.race_winners ( race_name, race_position, cyclist_name ) VALUES ( 'National Championships South Africa WJ-ITT (CN)', 2, { firstname:'Lynette', lastname:'BENSON' } ); INSERT INTO cycling.race_winners ( race_name, race_position, cyclist_name ) VALUES ( 'National Championships South Africa WJ-ITT (CN)', 3, { firstname:'Anja', lastname:'GERBER' } ); INSERT INTO cycling.race_winners ( race_name, race_position, cyclist_name ) VALUES ( 'National Championships South Africa WJ-ITT (CN)', 4, { firstname:'Ame', lastname:'VENTER' } ); INSERT INTO cycling.race_winners ( race_name, race_position, cyclist_name ) VALUES ( 'National Championships South Africa WJ-ITT (CN)', 5, { firstname:'Danielle', lastname:'VAN NIEKERK' } );
-