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

ÓÃsql²é¿´±í½á¹¹


1.oracle
 sql   = "SELECT column_name, data_type, data_length, nullable";
 sql += " from user_tab_columns ";
 sql += " where table_name='";
 sql += $tableName;
 sql += "'";
 select * from user_tab_comments   ²éѯ±íÃû¼°±í˵Ã÷£¨comment)
 select * from user_col_comments    ²éѯ±í¼°±íÖÐ×ֶεÄ˵Ã÷
2.sql server
select  name,xtype,length,isnullable  from  syscolumns
where id =(select  top 1 Id   from  sysobjects  where name = '±íÃû');
 
 sql   = "select  name,xtype,length,isnullable  from  syscolumns where id =";
 sql += " (select  top 1 Id   from  sysobjects  where name = '";
 sql += $tableName;
 sql += "')";
3.my sql
 sql   = "show columns from ";
 sql += $tableName;
»ò
 sql   = "desc ";
 sql += $tableName;
»ò
 sql   = "describe ";
 sql += $tableName;
 
 


Ïà¹ØÎĵµ£º

shp Îļþµ¼³ösql»òµ¼Èëpostgis

1.Ö±½Óµ¼ÈëÊý¾Ý¿â
   shp2pgsql -s "4326" -W "GBK" E:\shape\Road_polyline.shp  
road_cross| psql -U postgres -h 172.17.40.83 -d test
2.µ¼³ösql
   shp2pgsql -s "4326" E:\shape\Road_polyline.shp blocks >
E:\roadcross\blocks.sql
3 ......

³£ÓÃsqlÏà¹Ø

1Ð޸Ļù±¾±í
 Ìí¼ÓÁÐ alter table tableName add<ÐÂÁÐÃû><Êý¾ÝÀàÐÍ>[ÍêÕûÐÔÔ¼Êø]
 É¾³ýÁÐ alter table tableName drop<ÐÂÁÐÃû><Êý¾ÝÀàÐÍ>[ÍêÕûÐÔÔ¼Êø]
2´´½¨
  ½¨±ícreate table tableName(
id primary key AUTO_INCREMENT(mysql);
id primary key identity(1,1)(s ......

ÈçºÎÓÃSQL Óï¾ä¶ÁÈ¡DÅÌÄÚÈÝ

master..xp_dirtree   'D:\',1,1        µÚÒ»¸ö1ÊÇÉî¶È£¬µÚ¶þ¸ö1ÊÇÎļþ
1.   Ö´ÐÐ   master..xp_dirtree   'c:\',1,1,ÕâÑù¿ÉÒÔ»ñÈ¡c:\ϵÄËùÓÐÎļþºÍÎļþ¼Ð,²»°üÀ¨×ÓÎļþ¼Ð¼°Îļþ   
   
2.   ÏÔʾÔÚtreeviewÖÐ,ÓñêÖ ......

sqlÓï¾äµÄÖ´ÐÐ˳ÐòʵÀý½²½â


±ê׼˳ÐòµÄ SQL Óï¾äΪ: 
Select ¿¼ÉúÐÕÃû, max(×ܳɼ¨) as max×ܳɼ¨ 
from tb_Grade 
where ¿¼ÉúÐÕÃû is not null 
group by ¿¼ÉúÐÕÃû 
having max(×ܳɼ¨) > 600 
order by max×ܳɼ¨ 
ÔÚÉÏÃæµÄʾÀýÖÐ SQL Óï¾äµÄÖ´ÐÐ˳ÐòÈçÏÂ: 
(1). Ê×ÏÈÖ´ÐÐ from ×Ó¾ä, ´Ó tb_G ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ