MYSQL循环插入数据: DELIMITER $$
DROP PROCEDURE if exists test_insert;
CREATE PROCEDURE test_insert () BEGIN
DECLARE i INT DEFAULT 1 ;
DECLARE t TIMESTAMP DEFAULT NOW() ; WHILE i < 10001 DO
INSERT INTO userfacility.operation_logs ( id, EVENT,
operation_time, username, user_node, created_at ) VALUES (i,
CONCAT('
修
改
密
码
t,\"123\
SET i = i + 1 ; END WHILE ; END$$
CALL test_insert () ;
ORACLE循环插入数据: DECLARE
',
i),
i number(20):=0; BEGIN loop i:=i+1;
insert into \"test-orcl\" (\"az-int\") values(i); exit when i>1000; end loop; end;
SQL Server循环插入数据(不能加分号):
declare @i int set @i = 1 while @i < 1001 begin
insert into [test-Sqlserver] ([az-int]) values(@i) set @i = @i + 1 end
达梦数据库循环插入数据
CREATE OR REPLACE PROCEDURE PROC_BLOCK AS X INT := 0;
t date :='2016-06-12 15:12:20.011000'; BEGIN
FOR I IN 1 .. 999999 LOOP
insert into TABLE_1_7(PRIMARY_KEY,\"TYPE\values(I,1,t);
end loop; end ; /
call PROC_BLOCK;
getdate() sqlserver 获取系统当前时间 sysdate oracle 获取系统当前时间
oracle exp imp 导出和导入功能 exp imp
oracle 查询表中字段个数
select tname,count(tname) from col group by tname;
oracle解锁scott用户
alter user scott account unlock;// conn scott/tiger // username/password
达梦数据库查询当前用户下表模式 select
*
from
user_col_comments
where
table_name='ACCOUNT_T_T';
userid=system/manager
fromuser=username1
touser=username2 ignore=y file=expfile.dmp
userid=system/manager
owner=username1
file=expfile.dmp
因篇幅问题不能全部显示,请点此查看更多更全内容