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

sqlÓï¾ä»ù´¡

--------------------------------------------------------
--sql structured query language
--DML--Data Manipulation Language--Êý¾Ý²Ù×÷ÓïÑÔ
query information (SELECT),
add new rows (INSERT),
modify existing rows (UPDATE),
delete existing rows (DELETE),
perform a conditional update or insert operation (MERGE),
see an execution plan of SQL (EXPLAIN PLAN),
and lock a table to restrict access (LOCK TABLE).
--DDL--Data Definition Language--Êý¾Ý¶¨ÒåÓïÑÔ
create, modify,drop, or rename objects (CREATE,ALTER,DROP,RENAME),
remove all rows from a database object without dropping the structure (TRUNCATE),
manage access privileges (GRANT,REVOKE),
audit database use (AUDIT,NOAUDIT)
and add a description about an object to the dictionary (COMMENT).
--Transaction ControlÊÂÎñ¿ØÖÆÓï¾ä
save the changes(COMMIT)
or discard the changes (ROLLBACK) made by DML statements.
Also included in the transaction-control statements are statements to set a point or marker in the transaction for possible rollback (SAVEPOINT)
and to define the properties for the transaction (SET TRANSACTION).
Used to manage the properties of the database.
There isonly one statement in this category (ALTER SYSTEM).
--DCL--Data Control Language--Ó뿪·¢¹ØÏµ²»ÊǺÜÃÜÇÐ,ÓÃÓÚȨÏ޵ķÖÅäÓë»ØÊÕ
grant,revoke,data control
--Session Control
control the session properties (ALTER SESSION)
and to enable/disable roles (SET ROLE).
--System Control
--------------------------------------------------------
selectµÄÓ÷¨
--ÿ¸öÔ±¹¤µÄËùÓÐÐÅÏ¢
select * from emp
--ÿ¸öÈ˵IJ¿ÃűàºÅ£¬ÐÕÃû£¬Ð½Ë®
select deptno,ename,sal from emp;
--ÿ¸öÈ˵ÄÄêн
select ename,sal*12 from emp;
--¼ÆËã2*3µÄÖµ
select 2*3 from emp;
--¼ÆËã2*3µÄÖµ(dual)
select 2*3 from dual;
select * from dual;
--µÃµ½µ±Ç°Ê±¼ä
select sysdate from dual
--¿ÉÒÔ¸øÁÐÆð±ðÃû,±ÈÈçÇóÿ¸öÈ˵ÄÄêн
select ename,sal*12  salperyear from emp;
--Èç¹û±ðÃûÖÐÓпոñ£¬ÐèÒªÓÃË«ÒýºÅ
select ename,sal*12  "sal per y


Ïà¹ØÎĵµ£º

MySQL ×Ö·û¼¯µ¼ÖÂSQLÁ¬½ÓÖ®ºóÖÐÎÄÂÒÂëµÄÎÊÌ⣡

character-set-server = GB2312
collation-server = latin1_general_ci
MySQL×Ö·û¼¯ GBK¡¢GB2312¡¢UTF8Çø±ð ½â¾ö MYSQLÖÐÎÄÂÒÂëÎÊÌâ ÊÕ²Ø
MySQLÖÐÉæ¼°µÄ¼¸¸ö×Ö·û¼¯
character-set-server/default-character-set£º·þÎñÆ÷×Ö·û¼¯£¬Ä¬ÈÏÇé¿öÏÂËù²ÉÓõġ£
character-set-database£ºÊý¾Ý¿â×Ö·û¼¯¡£
character-set-table£ºÊ ......

SQL2005ºÍ(Excel |access)Ö®¼äµÄÊý¾Ýµ¼Èëµ¼³ö


Sql´úÂë
--²ÉÓÃSQLÓï¾äʵÏÖsql2005ºÍExcel Êý¾ÝÖ®¼äµÄÊý¾Ýµ¼Èëµ¼³ö£¬ÔÚÍøÉÏÕÒÀ´Ò»--Ï£¬ÊµÏÖ·½·¨ÊÇÕâÑùµÄ£º    
  
  
--Excel---->SQL2005  µ¼È룺    
  
  
select * into useinfo from O ......

[ÊÕ£] ÓÃsqlite Ö´Ðбê×¼ sql Óï·¨

http://www.umgr.com/blog/PostView.aspx?bpId=36294
 1. Ö´ÐÐsqlÓï¾ä
int sqlite3_exec(sqlite3*£¬ const char *sql£¬ sqlite3_callbacksql Óï·¨
£¬ void *£¬  char **errmsg );
Õâ¾ÍÊÇÖ´ÐÐÒ»Ìõ sql Óï¾äµÄº¯Êý¡£
µÚ1¸ö²ÎÊý²»ÔÙ˵ÁË£¬ÊÇÇ°Ãæopenº¯ÊýµÃµ½µÄÖ¸Õ롣˵ÁËÊǹؼüÊý¾Ý½á¹¹¡£
µÚ2¸ö²ÎÊýconst char ......

ʹÓÃSQL Serverά»¤¼Æ»®ÊµÏÖÊý¾Ý¿â¶¨Ê±×Ô¶¯±¸·Ý

ÔÚSQL ServerÖгöÓÚÊý¾Ý°²È«µÄ¿¼ÂÇ£¬ËùÒÔÐèÒª¶¨ÆÚµÄ±¸·ÝÊý¾Ý¿â¡£¶ø±¸·ÝÊý¾Ý¿âÒ»°ãÓÖÊÇÔÚÁ賿ʱ¼ä»ù±¾Ã»ÓÐÊý¾Ý¿â²Ù×÷µÄʱºò½øÐУ¬ËùÒÔÎÒÃDz»¿ÉÄÜÒªÇó¹ÜÀíԱÿÌìÊØµ½ÍíÉÏ1µãÈ¥±¸·ÝÊý¾Ý¿â¡£ÒªÊµÏÖÊý¾Ý¿âµÄ¶¨Ê±×Ô¶¯±¸·Ý£¬×î³£Óõķ½Ê½¾ÍÊÇʹÓÃSQL Server´úÀíÖеÄ×÷Òµ¡£Æô¶¯SQL Server Agent·þÎñ£¬È»ºóÔÚÆäÖÐн¨×÷Òµ£¬×÷ÒµÖÐÌí¼ ......

sql server 2000°²×°ÎÊÌ⼯

Ò»¡¢xpÏÂÃæ×°sql server 2000
SQL Server 2000 Driver for JDBC: Error establishing socket
ÒÔÏµķ½·¨ÄãÿÖÖµÄÈ¥ÊÔÊÔ:
#¼ì²éÒ»ÏÂsql serverµÄconnectionÓÐûÓÐfull.
#Èç¹ûÊÇÈÏÖ¤µÄÎÊÌâ.
¿Éµ½sql enterprice manager->Ö¸¶¨server->ÄÚÈÝ->°²È«ÐÔ.
°ÑÑéÖ¤¸ÄΪ SQL server ¼° windows.
#µãÑ¡ÊôÐÔ¼ì²éÒ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ