Çë½Ì¹ØÓÚoracleµÄ×Ô¶¨Ò庯ÊýµÄÎÊÌâ
create or replace function GetWorkBeginTime()
return date is
myDate date;
begin
myDate := trunc(sysdate-1)+8/24;
return myDate;
end;
дÁ˸öº¯Êý£¬¿ÉÊDZàÒ벻ͨ¹ý£ºCompilation errors for FUNCTION REPORTER.GETWORKBEGINTIME
Error: PLS-00103: ³öÏÖ·ûºÅ ")"ÔÚÐèÒªÏÂÁÐ֮һʱ£º
<an identifier>
<a double-quoted delimited-identifier> current
Line: 1
Text: create or replace function GetWorkBeginTime()
Ôõô½â¾ö£¿Çë¸ßÊÖÖ¸µã¡£
ÄãÊÇÔÚÄÄÀïÖ´Ðеİ¡£¬ÎÒµÄÔÚplsqlÀïÃæÖ´ÐУ¬ÍêÈ«³É¹¦µÄ¡£
SQL code:
create or replace function GetWorkBeginTime()
return date is
myDate date;
begin
myDate := trunc(sysdate-1)+8/24;
return myDate;
end GetWorkBeginTime;
ÕâÑùÊÔÊÔ¿´
¼ÓÉϲÎÊýÊÔÊÔ:
create or replace function GetWorkBeginTime1(out date)
return date is
myDate date;
begin
myDate := trunc(sysdate-1)+8/24;
return myDate;
end;
ÕâÑùÊÔÊÔ£º
create or replace function GetWorkBeginTime
return date is
myDate date;
Ïà¹ØÎÊ´ð£º
orcle Óï¾ä create table book1(name, price) as select book_name, price form book;
¶ÔÓ¦µÄMySQLµÄÓï¾äÊÇʲô
create table book1 as select book_name, price form book; ÕâÑùÔÚMySQLÀï¿ÉÒÔ£¬µ«ÊÇÈ´² ......
ÕâÊÇÎÒÔÀ´Á¬½ÓSQLµÄ´òÓ¡µÄ´úÂë
Connection1.Open "Provider=MSDataShape.1;Persist Security Info=True;Data Source=mm;User ID=sa;Password=sa;Initial Catalog=lc-liuh2;Data Provider=SQLOLEDB.1"Ê ......
--oracle ´¥·¢Æ÷£¬×ª sqlserver ÎÊÌâ
CREATE OR REPLACE TRIGGER TG_BU_TSTK_IMPORTITEM
BEFORE UPDATE ON TSTK_IMPORTITEM
FOR EACH ROW
DECLARE
VAR_LIBGOODCOUNT NUMERIC(12,2);
BEGIN
......
Èç¹ûÒ»¸ö³ÌÐòÏëÖ§³ÖsqlserverÓëoracleÊý¾Ý¿âµÄ»°¡£³ýÁËdbhelperÀàÐèÒª¸Ä±äÖ®Í⣬²ÎÊý´«µÝÒ²ÊǸöÎÊÌâ¡£
sqlserverµÄ²ÎÊýǰ׺ÊÇ ¡°@¡±£¬¶øoracleÊÇ ¡°:¡±
ÇëÎÊÓÐûÓÐʲôͨÓýâ¾ö·½·¨£¿ÎÒ²»ÏëÒ»¸öselect ......
ÎÒÓõÄÊÇPreparedStatementÀ´·¢ËÍÌá½»£¬²¢ÇÒÊý¾ÝÁ¿·Ç³£ÅÓ´ó¡£
Ò»´ÎÐèÒªÖ´ÐÐ8900¶àÌõ¸üÐÂÓï¾ä£¬Ò²¾ÍÊÇUpdateÓï¾ä¡£
ÎÒÊÔ¹ý·Ö¿ª£¬Ò»²¿·ÖÒ»²¿·ÖÀ´Ö´ÐÐÌá½»£¬µ«»¹ÊÇÒ»ÑùµÄËÙ¶ÈÂý£¬¶øÇÒÔ½Ö´ÐÐÔ½Âý¡£ÊµÔÚÊÇûÓÐʲô ......