´«ÖDz¥¿Íjavaѧϰ sql¶ÔÏó
ÎÒ½ñÌìѧϰÁËOracleÊý¾Ý¿âÈçºÎÐ޸ıíµÄ֪ʶ£¬ÊÇ·ëÍþÀÏʦ½²µÄ¿Î£¬ÎÒ×öÁ˼òµ¥µÄ¼Ç¼£º
1.ÔÚ±íÖвåÈëеÄÁУº
alter table tablename
add city varchar£¨2£© default 'rr' //¸³Ä¬ÈÏÖµ
2.Ð޸ıíÖеÄÁУº
alter table tablename
modify city varchar£¨20£©
3.ɾ³ý±íÖеÄÁУº
alter table tablename
drop column city
4.ɾ³ý±íµÄÄÚÈÝ£º
TRUNCATE TABLE tablename
Ëü¿ÉÒÔÇå³ý±íÖÐËùÓеļǼ£¬delete¿ÉÒÔÑ¡Ôñɾ³ý±íÖеÄÒ»²¿·Ö
ËüÊÇDDLÓï¾ä£¬²»¿ÉÒԻعö£¬delete¿ÉÒÔʹÓÃrollback»Ø¹ö£¬·ÅÆúÐ޸ġ£
Ëû¿ÉÒÔÊͷűíµÄ´æ´¢¿Õ¼ä£¬delete²»ÊÍ·Å¿Õ¼ä
5.ɾ³ý±íµÄÓï¾ä£ºÕâ¸öɾ³ý²Ù×÷²»Äܻعö
drop table tablename
6.¸Ä±ä¶ÔÏóµÄÃû³Æ£º
ʹÓÃRENAMEÓï¾ä¸Ä±ä¶ÔÏóÃû³Æ£¬¿ÉÒÔÐÞ¸Ä±í¡¢ÊÓͼ¡¢ÐòÁлòÕßͬÒå´ÊµÄÃû³Æ
RENAME old_name TO new_name;
**************************************************************
1.ÔÚOracleÊý¾Ý¿âÖÐµÄ±í£º
Óû§±í:
±»Óû§´´½¨ºÍά»¤µÄһЩ±í
°üÀ¨ÁËÓû§×Ô¼ºµÄÐÅÏ¢
Êý¾Ý×Öµä±í:
±»OracleÊý¾Ý¿â´´½¨ºÍά»¤µÄһЩ±í
°üÀ¨ÁËÊý¾Ý¿âµÄÐÅÏ¢
2.Êý¾Ý×ֵ䣺
ÊÇÿ¸öOracleÊý¾Ý¿âµÄºËÐÄ
ÓÃÓÚÃèÊöÊý¾Ý¿âºÍËüµÄËùÓжÔÏó
°üÀ¨ÁËÖ»¶ÁµÄ±íºÍÊÓͼ
±» SYSÓû§ÓµÓÐ
±» Oracle serverά»¤
Óû§¿ÉÒÔʹÓà SELECT·ÃÎÊ
3.²éѯÓû§ÏÂËùÓÐµÄ±í£º
select * from user_name
4.²éѯµ±Ç°Óû§Ï±íÖеÄÁУº
select table_name ,column_name from user_tab_columuns
5.²éѯµ±Ç°Óû§ÏÂdept±íÖеÄÁУº
6.Ô¼Êø£º¶Ô±íÖеÄÊý¾ÝÏÞÖÆ¡£
7£ºOracle Ö§³ÖÏÂÃæÎåÀàÍêÕûÐÔÔ¼Êø:
1¡¢NOT NULL ·Ç¿Õ
2¡¢UNIQUE Key Ψһ¼ü
3¡¢PRIMARY KEY Ö÷¼ü
4¡¢FOREIGN KEY Íâ¼ü
5¡¢CHECK ¼ì²ì
8.Ô¼Êø£º
Çø·ÖÁм¶Ô¼ÊøºÍ±í¼¶Ô¼Êø£º
Áм¶Ô¼Êø£ºÔÚ½¨±íµÄͬʱ´´½¨
±í¼¶Ô¼Êø£º½¨±íºó´´½¨
9.·Ç¿ÕÔ¼Êø£¨NOT NULL£©£ºÈ·±£×Ö¶ÎÖµ²»ÔÊÐíΪ¿Õ
10.²é¿´±íµÄÔ¼Êø£ºselect
Ïà¹ØÎĵµ£º
×Ô´ÓѧϰJavaÒÔÀ´ÒѾһÄêÓÐÓàÁË£¬¶ÔJava»¹Ö»Êdzõ½×¶ÎµÄÁ˽⣬¶¼¹ÖÔÚѧУµÄʱºòÌ°ÍæûÓÐÓÐЧµÄÀûÓÃʱ¼ä£¬ÏÖÔÚÔÚÒ»¸öÅàѵѧУѧϰJava£¬ÏÖÔÚ¾ÍÒª×öÏîÄ¿ÁË»¹ÊÇʲô¶¼²»¶®£¬»¹ºÃÓÐCsdn¡£
ÔÚCsdnµÄÈÕ×ÓÀï½ÐÎÒÕÒµ½Á˼ҵĸоõ£¬µÃµ½Á輆 ......
/*
* @(#)MemoryMonitor.java 1.3 05/11/17
*
* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are ......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
//sqlserverÉí·ÝÑéÖ¤
//string sqlconn = "ser ......
ÒÔÇ°ÔÚ°²×°sqlµÄʱºò£¬Èç´ËÌáʾ£¬ÎÒÖ»ÒªÖØÐÂÆô¶¯¼´¿É£¬¿ÉÊǽñÌìÖØÐÂÆô¶¯ÁËN´Î¼ÆËã»ú£¬ÎÊÌâÈ´Ë¿ºÁûÓнâ¾ö£¬ÒÀÈ»ÌáʾÕâÑùµÄ»°¡£“ÒÔÇ°µÄij¸ö³ÌÐò°²×°ÒÑÔÚ°²×°¼ÆËã»úÉÏ´´½¨¹ÒÆðµÄÎļþ²Ù×÷¡£ÔËÐа²×°³ÌÐò֮ǰ±ØÐëÖØÐÂÆô¶¯¼ÆËã»ú¡£” Ö»ºÃgoogleÒÔÏ£¬×îÖÕµÃÖªÊÇ°²×°³ÌÐòÔÚÏÈÇ°µÄ°²×°¹ý³ÌÖÐÔÚϵͳע²á±íÁôÏÂijЩÐÅÏ¢£ ......