SQL learning
Five basic search conditions are summarized here:
1) Comparison test
2) Range test
3) Set membership test
4) Pattern matching test (Like)
The pattern matching test checks to see whether the data value in a column matches a specified pattern
% mathes any sequence of zero or more characters.
_ matches any single character.
// Find products whose product IDs start with the four letters "A%BC"
SELECT order_num ,product
from orders
WHERE product LIKE 'A$%BC' ESCAPE '$' ;
5) Null value test (IS NULL)
In SQL's three-valued logic, a search condition can yield a TRUE,FALSE, or NULL result. Only rows where search codition yields a TRUE result are included in the query result.
Rules For Single-Table Query Processing
The from clause is applied first; the where clause is applied next ; the SELECT clause is applied next . Finally, the
ORDER BY clause is applied to sort the query results.
Ïà¹ØÎĵµ£º
ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......
C#ÖÐÒÔwindowsÑéÖ¤·½Ê½Á¬½ÓSQL serverÊý¾Ý¿âµÄÀà¡£ºÜ¶àÈËÁ¬½ÓÊý¾Ý¿âʱ¿ÉÄܶ¼ÊÇÍøÉϲéÁËÈ»ºó¾ÍÁ¬ÁË£¬¶ÔÓÚ²ÎÊýµÄº¬Òåµ¹ÊÇûÔõôÔÚÒ⣬żҲÊÇ£¨ºÇºÇ£©£¬µ±È»ÎÒÃǶ¼×¢Öؽá¹ûÂ¿ÉÊÇÕâÑù²»ÈÝÒ×¼ÇÒäÿ´ÎÁ¬µÄʱºò¶¼ÊÇÉÏÍø²é£¬¸Ð¾õͦ²»·½±ã£¬ËùÒÔË÷ÐÔ²éÁËһϡ£~~~Integrated Security=True£»±íʾÔÚÁ¬½ÓÊý¾Ý¿â½øÐÐÉí·ÝÑé֤ʱÓÃwind ......
ÎÒÃǶ¼ÖªµÀÔÚOracleÖÐÿÌõSQLÓï¾äÔÚÖ´ÐÐ֮ǰ¶¼ÐèÒª¾¹ý½âÎö£¬ÕâÀïÃæÓÖ·ÖΪÈí½âÎöºÍÓ²½âÎö¡£ÔÚOracleÖдæÔÚÁ½ÖÖÀàÐ͵ÄSQLÓï¾ä£¬Ò»ÀàΪ
DDLÓï¾ä£¨Êý¾Ý¶¨ÒåÓïÑÔ£©£¬ËûÃÇÊÇ´ÓÀ´²»»á¹²ÏíʹÓõģ¬Ò²¾ÍÊÇÿ´ÎÖ´Ðж¼ÐèÒª½øÐÐÓ²½âÎö¡£»¹ÓÐÒ»Àà¾ÍÊÇDMLÓï¾ä£¨Êý¾Ý²Ù×ÝÓïÑÔ£©£¬ËûÃÇ»á¸ù¾ ......
1 ·ÀÖ¹sql×¢Èëʽ¹¥»÷(¿ÉÓÃÓÚUI²ã¿ØÖÆ£© #region ·ÀÖ¹sql×¢Èëʽ¹¥»÷(¿ÉÓÃÓÚUI²ã¿ØÖÆ£©
2
3 /**/ ///
4 /// ÅжÏ×Ö·û´®ÖÐÊÇ·ñÓÐSQL¹¥»÷´úÂë
5 ///
6 /// ´«ÈëÓû§Ìá½»Êý¾Ý
7 /// ......