将用逗号隔开字段拆分成两行: select * from mp_fs_file_info a,dm_process_upload b where instr(b.attachment,a.file_id,1,1)>0; 字段名小写加双引号to_char转换成制定格式. select to_char(xmmc), 项目名称,dwmc "name" from desulfidation, 插入多条数据:insert into imdt_role_permission ( (…
新增字段:alter table 表名 add (NAME VARCHAR(12), NAME NUMBER(10) );--如果添加单个字段可以不用括号包起来,例如 alter table custinfo add sex char(1) 添加注释:comment on column 表名.name is '姓名'; 删除表字段:alter table 表名 drop column 字段名(列名); 修改字段名:alter table 表名 rename column 现列名 to 新列名;…
--创建oracle登录用户 create user CHECKDATAUSER identified by "bsoft" default tablespace PBPGCHECKDATA temporary tablespace TEMP profile DEFAULT password expire; --删除用户 drop user CHECKDATAUSER CASCADE --授予用户会话权限 grant connect,resource to CH…
查看表中的字段名和类型 SELECT column_name,DATA_TYPE FROM cols WHERE TABLE_NAME=upper('tableName') ORDER BY COLUMN_NAME; 查看当前用户下的所有表: select * from user_tables t ORDER BY t.TABLE_NAME; 查看autocommit状态: SHOW AUTOCOMMIT; 打开或关闭AUTOCOMMIT: SET AUTOCOMMIT ON/OFF;…