Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

SqlÓï¾äÎÊÌâ - ÆäËûÊý¾Ý¿â¿ª·¢ / MySQL/Postgresql

Àý:
insert into tablename values('select * from tablename')£»


ÎÒÏëÈÃselect * from tablenameÔ­ÑùµÄ·Åµ½tablenameÖУ¬ÇëÎʸ÷룬sqlÎÄÔõô¸Ä°¡


select * from tablename ×÷Ϊ×Ö·û´®£¬²»ÈÃÆäÖ´ÐÐ!!

лл£¡£¡
insert into tablename select * from tablename

SQL code:
insert into tablename select 'select * from tablename';


SQL code:
insert into tablename (columnname) select 'select * from tablename';



insert into tablename(col1,col2...) select col1,col2... from tablename

ÈçºÎ¸Ä³ÉÁ½ÁÐÄØ£º
Àý:
insert into tablename(id,sqlstr) values(1,'select * from tablename')£»


ÎÒÏëÈÃselect * from tablenameÔ­ÑùµÄ·Åµ½tablenameÖÐsqlstrÁУ¬ÇëÎʸ÷룬sqlÎÄÔõô¸Ä°¡


select * from tablename ×÷Ϊ×Ö·û´®£¬²»ÈÃÆäÖ´ÐÐ!!

лл£¡£¡

SQL code:
insert into tablename(id,sqlstr) select (1,'select * from tablename')£»


SQL code:
insert into tablename(id,sqlstr) select 1,'select * from tablename'


Ïà¹ØÎÊ´ð£º

mysql ÀÛ¼ÓÔËËã - ÆäËûÊý¾Ý¿â¿ª·¢ / MySQL/Postgresql

sp ³ÌÐò
delimiter //
create procedure ma()
begin
declare i int default 0;
while i<11 do
set i=i+1;
select i;
end while;
end //
delimiter ;
1+2+...+9+10
ΪʲôÕâ¸ö³ÌÐòÎÞ·¨ÊµÏÖÀÛ¼ÓЧ¹û
/ ......

mysqlµÄ¸üÐÂÓï¾ä - Java / Java SE

id name datetime
1 a 2010-05-13 10:15:00
2 b 2010-05-14 09:10:00
3 d 2010-05-14 10:10:00
ÈçºÎ½«¾àÀëÄ¿Ç°×î½üµÄÄǸö¼Ç¼µÄname ¸üÐÂΪ¡°x¡±ÄØ
лл¿© °¡ ºÇºÇ
update table_n ......

SQL·ÖÒ³ÓëOracle·ÖÒ³µÄÒÉÎÊ£¿ - Java / Web ¿ª·¢

ÕâÀïÏëÁ˽âÏ£¬¹ØÓÚSQL ServerÖзÖÒ³ºÍOracleÖзÖÒ³£»
ƽ³£Ð´Ó¦ÓóÌÐòµÄʱºò£¬±ÈÈçÓõÄÓïÑÔÊÇJava£¬ÓиöÁбíÒ³Ã棬ÐèÒª¶ÔÊý¾Ý·ÖÒ³ÏÔʾ£»
ÕâÀïÒª·ÖÒ³ÄѵÀ²»ÐèÒª½èÖúJava£¬¶øÖ±½ÓsqlÄÜÖªµÀ·ÖÒ³Âð£¬ÆðÂëÒ²Òª´«¸öÒ³Âë½ ......

asp wap sqlÓï¾äÖлñÈ¡µÄºº×Ö²»ºÃÊ - Web ¿ª·¢ / ASP

SQL code:

rs.open "select * from guide where city_name='±±¾©' order by pai desc",conn,1,1
do while not rs.eof or rs.bof
¡£¡£
¡£¡£
¡£¡£
rs.movenext
loop
Õâ¸ösqlÓï¾äÔÚwapÕ¾Àï ±¾ÉíÓÐ ......

SQLÓï¾ä OR ´æ´¢¹ý³Ì£¿ - .NET¼¼Êõ / C#

Ö´ÐÐÊý¾Ý¿â²Ù×÷ʱ£¬Ö±½ÓÓÃSQL Óï¾äºÃһЩ »¹ÊÇÓô洢¹ý³Ì¸ü¼ÑÄØ£¿
¸÷ÊãÆð¼û
Õâ¸öµÄ¾ßÌåÎÊÌâ¾ßÌå·ÖÎö
¼òµ¥µÄselect ¡¢updateºÍinsertµ±È»sql½â¾öÁË
¸´ÔӵķÅÔÚsql·þÎñ¶ËÓ¦¸ÃºÃµã

Â¥Ö÷Çë²ÎÔÄ
http://msdn.micr ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ