获取表的字段列表

public static ArrayList  ReturnTableField(string tableName)
  {
   string sql="SELECT  c.name as FieldName FROM SYSCOLUMNS c inner join  systypes t on c.xusertype=t.xusertype WHERE c.ID = OBJECT_ID('"+tableName+"')";
   
   return DBHelper.ExecuteArrayList(CommandType.Text,sql,0);

  }

posted @ 2005-11-16 18:41  meteorcui  阅读(143)  评论(0编辑  收藏  举报