通过本次课程,学习openGauss数据库查询、更新和删除基本使用。
数据库的建表操作:
CREATE TABLE customer_t
( c_customer_sk integer,
c_customer_id char(5),
c_first_name char(6),
c_last_name char(8)
) ;
数据插入:
INSERT INTO customer_t VALUES
(6885, 1, 'Joes', 'Hunter'),
(4321, 2, 'Lily','Carter'),
(9527, 3, 'James', 'Cook'),
(9500, 4, 'Lucy', 'Baker');
数据更新:
update customer_t set c_customer_id = c_customer_id + 100;
数据删除:
delete from customer_t where c_first_name = 'Lucy';
drop table customer_t;
学习和了解的基本的数据操作。建立表,插入数据,更改数据,删除数据,删除表。
更多的sql语法学习地址可以参考:https://opengauss.org/zh/docs/2.1.0/docs/Developerguide/SQL%E8%AF%AD%E6%B3%95.html
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




