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

SQL·ÖÒ³²éѯ

thunder:
1.MYSQLʵÏÖ
mysql> select * from user;
+----+----------+----------+-----------------+
| ID | username | password | email           |
+----+----------+----------+-----------------+
|  1 | admin    | admin    | abc@yahoo.cn    |
|  2 | thomas   | 159753   | thomas@yahoo.cn |
|  3 | thomas1  | 159753   | thomas@yahoo.cn |
|  4 | huhu     | 159753   | hu@yahoo.cn     |
|  5 | fdg      | dfg      | fdg             |
|  6 | sdf      | sd       | sdf@yahoo.cn    |
|  7 | d        | d        | d@d.cn          |
+----+----------+----------+-----------------+
7 rows in set (0.00 sec)
mysql> select * from user limit 3,2;
+----+----------+----------+-------------+
| ID | username | password | email       |
+----+----------+----------+-------------+
|  4 | huhu     | 159753   | hu@yahoo.cn |
|  5 | fdg      | dfg      | fdg         |
+----+----------+----------+-------------+
2 rows in set (0.00 sec)
mysql>
===================================================
2.MSSQLServerʵÏÖ
select top 5 function_id,function_name from d_function
where function_id not in (select top 5 function_id from d_function)
6 ÔÂͳ¼Æ
7 ²¿ÃŲéѯ
8 ¹«Ë¾²éѯ
9 ¹¤³ÌÕбê
10 ¹¤³Ì×ܽá


Ïà¹ØÎĵµ£º

SQLSERVER SQLÐÔÄÜÓÅ»¯

1.Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)¡¡¡¡
¡¡¡¡ SQLSERVERµÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬Òò´Ëfrom×Ó¾äÖÐдÔÚ×îºóµÄ±í£¨»ù´¡±ídriving table£©½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏ£¬±ØÐëÑ¡Ôñ¼Ç¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í£¬µ±SQLSERVER´¦Àí¶à¸ö±íʱ£¬»áÔËÓÃÅÅÐò¼°ºÏ²¢µÄ·½Ê½Á ......

ʹÓÃSQLServerÄ£°åÀ´Ð´¹æ·¶µÄSQLÓï¾ä

Èç¹ûÄã¾­³£Óöµ½ÏÂÃæµÄÎÊÌ⣬Äã¾ÍÒª¿¼ÂÇʹÓÃSQL ServerµÄÄ£°åÀ´Ð´¹æ·¶µÄSQLÓï¾äÁË£º
SQL³õѧÕß¡£
¾­³£Íü¼Ç³£ÓõÄDML»òÊÇDDL SQL Óï¾ä¡£
ÔÚ¶àÈË¿ª·¢Î¬»¤µÄSQLÖУ¬Ã¿¸öÈ˶¼ÓÐ×Ô¼ºµÄSQLÏ°¹ß£¬Ã»ÓÐÒ»Ì×ͳһµÄ¹æ·¶¡£
ÔÚSQL Server Management StudioÖУ¬ÒѾ­¸ø´ó¼ÒÌṩÁ˺ܶೣÓõÄÏÖ³ÉSQL¹æ·¶Ä£°å¡£
SQL Server Management ......

ÈçºÎÌá¸ßaspµÄSQLµÄÖ´ÐÐЧÂÊÌá¸ßÊý¾Ý¿â¶ÁÈ¡ËÙ¶È

·½·¨Ò»¡¢¾¡Á¿Ê¹Óø´ÔÓµÄSQLÀ´´úÌæ¼òµ¥µÄÒ»¶Ñ SQL.
ͬÑùµÄÊÂÎñ£¬Ò»¸ö¸´ÔÓµÄSQLÍê³ÉµÄЧÂʸßÓÚÒ»¶Ñ¼òµ¥SQLÍê³ÉµÄЧÂÊ¡£Óжà¸ö²éѯʱ£¬ÒªÉÆÓÚʹÓÃJOIN¡£
oRs=oConn.Execute("SELECT * from Books")
while not oRs.Eof
strSQL = "SELECT * from Authors WHERE AuthorID="&oRs("AuthorID") oRs2=oConn.Execute(strSQ ......

SQL SERVER 2005 Êý¾Ý¿â״̬Ϊ¡°¿ÉÒÉ¡±µÄ½â¾ö·½·¨

--MyDBΪÐÞ¸´µÄÊý¾ÝÃû
USE MASTER
GO
SP_CONFIGURE 'ALLOW UPDATES',1 RECONFIGURE WITH OVERRIDE
GO
ALTER DATABASE MyDB SET EMERGENCY
GO
sp_dboption 'MyDB', 'single user', 'true'
GO
DBCC CHECKDB('MyDB','REPAIR_ALLOW_DATA_LOSS')
GO
ALTER DATABASE MyDB SET ONLINE
GO
sp_configure 'allow updates ......

ÅúÁ¿ÐÞ¸ÄSQLÊý¾Ý¿â×Ö¶ÎÖµ

ÕýÈ·µÄÐ޸ķ½·¨£ºsqlÅúÁ¿ÐÞ¸Ä×Ö¶ÎÄÚÈݵÄÓï¾ä
1¡¢Ã»ÊÔ¹ý£¬ÍøÉÏËÑË÷µÄ

ÒýÓÃ
update '±íÃû' set ÒªÐÞ¸Ä×Ö¶ÎÃû = replace (ÒªÐÞ¸Ä×Ö¶ÎÃû,'±»Ìæ»»µÄÌض¨×Ö·û','Ìæ»»³ÉµÄ×Ö·û')
2¡¢×Ô¼º°´ÕÕÒ»¸öÒ»¸öÐÞ¸ÄÊÇ¿´Êý¾Ý±í×ܽáµÄ
ÀýÈçżÐÞ¸Ä×Ô¼º²©¿Íboblog_replies±íÖеÄadminrepidºÍadminreplier×Ö¶ÎÖµ£º
UPDATE `xxx`.`boblog_ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ