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 ¹¤³Ì×ܽá
Ïà¹ØÎĵµ£º
·½·¨Ò»¡¢¾¡Á¿Ê¹Óø´ÔÓµÄ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 ......
Table-Naming Standards
Table-naming standards, as well as any standard within a business, are critical to
maintaining control. After studying the tables and data in the previous sections, you
probably noticed that each table’s suffix is _TBL. This is a naming standard selected
for use, suc ......
ÓÃPL/SQL Deleveloperµ¼³öcsvÎļþ¸ñʽÊý¾Ý£¬ÓÃexcel´ò¿ªÊÇÂÒÂ룬ÓüÇʱ¾´ò¿ªÕý³££¬Ôõô»ØÊ£¿
ÂíÉÏGoogle£¬ÔÀ´µ¼³öµÄÎļþµÄ±àÂë¸ñʽÊÇUTF-8ºÍ¶øexcelĬÈÏ´ò¿ªÎļþµÄ±àÂëÊÇunicode£¬ÓÚÊÇ£º
1¡¢ÓüÇʱ¾´ò¿ªÎļþ£¬È»ºóÁí´æÎª£¬ÌîдÎļþÃû£¬Ñ¡Ôñ±àÂë¸ñʽΪunicode
2¡¢ÓÃexcel´ò¿ªÐµÄÎļþ£¬Õý³£ÏÔʾ
µ«ÊdzöÏÖÁíÍâµÄÎÊÌ⣠......
µÍЧ: (Ë÷ÒýʧЧ)
SELECT … from DEPARTMENT WHERE DEPT_CODE IS NOT NULL;
¸ßЧ: (Ë÷ÒýÓÐЧ)
SELECT … from DEPARTMENT WHERE DEPT_CODE >=0;
£¨27£©×ÜÊÇʹÓÃË÷ÒýµÄµÚÒ»¸öÁУº
Èç¹ûË÷ÒýÊǽ¨Á¢ÔÚ¶à ......
×ö¿ª·¢¹ý³ÌÖУ¬¾³£»áÓõ½½«ExcelÖÐÊý¾Ýµ¼³öµ½SQL ServerÖеÄÇé¿ö£¬Äã¿ÉÒÔÀûÓÃSQL SERVER ÖÐ×Ô´øµÄµ¼ÈëÊý¾ÝµÄ·½Ê½£¬µ«ÕâÖÖ·½Ê½£¬ÓÐʱ»á·¢ÏÖÊý¾Ýµ¼Èëºó£¬¿ÉÄÜΪ¿Õ£¬¿ÉÄÜ¿ªÍ·ÉÙ¸öÁ㣬´ËÖÖÇé¿ö¶à³öÏÖÓÚÊýÖµÐ͵ÄÁУ¬½ñÌìÔÚCSDNÉÏÏй䣬ż¶û·¢ÏÖÁËÒ»¸öÌû×Ó£¬½éÉܵÄÒÔÏÂÕâÖÖ·½·¨£¬±¾ÈËÇ¡ÆßÒò×î½ü¹«Ë¾×¼±¸ÉÏÊУ¬É󼯾ÖÔÚ×öÉ󼯣¬¼¼ ......