zoukankan      html  css  js  c++  java
  • pogresql基础学习笔记

    命令行工具:psql

    可视化工具:pgAdmin

    查看所有表:

      命令行:d

      sql:select * from pg_tables WHERE schemaname='public';

    查看表结构:

      命令行:d table_name

      sql:太麻烦

     创建函数(存储过程):

    CREATE OR REPLACE FUNCTION totalRecords ()  
    RETURNS integer AS $total$  
    declare  
        total integer;  
    BEGIN  
       SELECT count(*) into total FROM EMPLOYEES;  
       RETURN total;  
    END;  
    $total$ LANGUAGE plpgsql;

      使用:select totalRecords();

      

  • 相关阅读:
    第四次
    jsp
    2021.3.4
    第八次作业
    第七次作业
    第六周作业
    第五周作业
    第四周
    第四次jsp作业
    第二次作业
  • 原文地址:https://www.cnblogs.com/adeng/p/7245056.html
Copyright © 2011-2022 走看看