SQLITE²åÈëÓï¾ä´íÎó
SQL code:
IF NOT EXISTS(SELECT * from Company WHERE MAC='aa:22:cc:22:ee:ff')
INSERT INTO Company(Mac,CompanyId,CompanyName,FtpParameter) Values('aa:22:cc:22:ee:ff','00101','aabbcc','192.168.123.11|21|abc|abc')
ΪʲôÌáʾ£º
Error message: SQL script is wrong
SQL code:
create table #t(Mac varchar(50),CompanyId varchar(50),CompanyName varchar(50),FtpParameter varchar(50))
IF NOT EXISTS(SELECT * from #t WHERE MAC='aa:22:cc:22:ee:ff')
INSERT INTO #t(Mac,CompanyId,CompanyName,FtpParameter) Values('aa:22:cc:22:ee:ff','00101','aabbcc','192.168.123.11|21|abc|abc')
select * from #t
Mac CompanyId CompanyName FtpParameter
-------------------------------------------------- -------------------------------------------------- -------------------------------------------------- --------------------------------------------------
aa:22:cc:22:ee:ff 00101 aabbcc 192.168.123.11|21|abc|abc
(1 ÐÐÊÜÓ°Ïì)
drop ta
Ïà¹ØÎÊ´ð£º
СµÜ Ūµã¶«Î÷¿ÉÊǵ÷Óà sqlite3_prepare Õâ¸öº¯Êý select ¾ÍºÃʹ Ö»Òª ¸Ä±äÊý¾Ý¿â µÄ¾Í²»ÐÐ ±ÈÈçinsert Ö®ÀàµÄ ËÀ´°ï¸öæ°¡ ÇëÎÊÕâÊÇʲôÔÒò °¡ Óà c ȥʵÏÖµÄ
ÄãÓõÄʲô¹¤¾ß°¡?
°ÑÄã×Ô¼ºµÄ´úÂë·¢ ......
ÎÒÏëÒª½«sqliteÊý¾Ý¿âÖеÄÊý¾Ý£¬ÒÔÊ÷¿Ø¼þµÄÐÎʽ¶Á³ö£¬²¢ÇÒÏÔʾÔÚ¶Ô»°¿òÉÏÃæ£¬²»ÖªµÀÔõô×ö£¬À´Çë½Ìһϡ£
ps£º¿´µ½ÓÐʹÓÃÊ÷¿Ø¼þºÍaccessµÄ£¬ÀïÃæÓÐÊý¾Ý¿âÒýÇæÀ´Á¬½ÓÊý¾Ý¿âºÍ³ÌÐò£¬ÎÒ²»ÖªµÀSQLiteÈçºÎÓë³ÌÐòÁ¬½ÓÆð ......
ÊÖÍ·ÓÐÒ»¸öСCASE£¬ÒªÓõ½Êý¾Ý¿â£¬Ïë²ÉÓÃSQLite¡£
ÓÐÓùýµÄÅóÓÑÂð£¿
ÒªÔõô°²×°sqlite·þÎñ£¿»¹ÊDz»ÐèÒª°²×°£¿
ÓÃʲôÈí¼þÀ´¹ÜÀíSqliteÊý¾Ý¿â£¿ÈçÌí¼Ó±í£¬Ð´´æ´¢¹ý³ÌµÈ¡£
delphiÖÐÔõôÑùÁ¬½Óµ½sqliteÊý¾Ý¿â£¿ÓÃʲ ......
ÄǸö¸ßÊÖ½Ó´¥¹ýsqlite£¬·¢µã¶ÔsqliteµÄÏêϸԴÂë·ÖÎö£¬Ð»Ð»~~
Ô´´úÂëµ¹ÊDz»ÉÙÈËÏÂÁË,Ò²¿´ÁË,µ«ÍêÕûµÄ·ÖÎöûÓÐ.
ÒýÓÃ
Ô´´úÂëµ¹ÊDz»ÉÙÈËÏÂÁË,Ò²¿´ÁË,µ«ÍêÕûµÄ·ÖÎöûÓÐ.
ÓÐûÓÐһЩ¹ØÓÚSQLiteÄÚ´æ·ÖÅä· ......
ÇëÎʸ÷λ´ó¸ç,ËÓÐÉú³É·ÃÎÊsqliteÊý¾Ý¿âµÄ´úÂëÉú³ÉÆ÷,·üÍû´ó¼Ò°ïæ...
СµÜ¼±ÓÃ
wuyq11
(ÈËÉúÈçÃÎ) ÄúºÃ,wuyq11
UcfarDBAÊÇÔõôʹÓõÄ,СµÜ¿´µ½ÀïÃæÖ»ÓÐcstÎļþ,Ó¦¸ÃÊÇÄ£°å,ÕâЩģ°åÒªÔõÃ´Ê ......