1.创建一个函数function1 -- FUNCTION: public.function1(character varying, integer) -- DROP FUNCTION public.function1(character varying, integer); CREATE OR REPLACE FUNCTION public.function1( useridl character varying, groupidl integer) RETURNS TABLE(vehicle…
--数据库是否存在 IF exists(SELECT * FROM master..sysdatabases WHERE name=N'库名') PRINT 'exists' ELSE PRINT 'not exists' --------------- -- 判断要创建的表名是否存在 ) -- 删除表 DROP TABLE [dbo].[表名] GO --------------- --判断要创建临时表是否存在 IF Object_Id('Tempdb.dbo.#Test') Is Not N…
Get the current free disk space in PostgreSQL PostgreSQL获取磁盘空间 from eshizhan Here has a simple way to get free disk space without any extended language, just define a function using pgsql. CREATE OR REPLACE FUNCTION sys_df() RETURNS SETOF text[] LANG…