Hi, this is the common operation of GaussDB.
1.login operations
1.1 Connect to GaussDB
docker exec -it 66cd29b536556f18b579fb3b646b8678624216af0a05fd600f76f5ba6bd33d25 bash// Enter the GaussDB container
su - postgres; // Switch to the postgres user
gsql -d vcm; //login

2. operations
2.1 Log out of the database
\q // Log out of the database

2.2 Listing all databases
\l // Listing all databases

2.3 Connect to other databases
\c [database_name] // Connect to other databases

3. Operation on database tables
3.1.List all tables in the current database
\d // List all tables in the current database

3.2、List the structure of a table
\d [table_name] // List the structure of a table

4. Operations on database table records
4.1.View the record of a table
select * from vias_conf;

4.2、Delete the record of a table
delete from vias_conf where id=1;

4.3、Insert a record in the table
INSERT INTO VIAS_CONF VALUES (1,'10.134.195.152','7006','123','0123456',0 ,'111',0 ,'11111',NULL,NULL,NULL,NULL,NULL);

4.4 Modify the record of the specified field of the table
update vias_conf set password='123456' where id=1;

Thanks for reading!


