//得到数据库中所有表的名字;
       string sql = " select   name   from   sysobjects   where   type='U'";
    //通过表名获取所有字段名;
         string sql = "Select name from syscolumns Where ID=OBJECT_ID('"+tableName+"')";
    //通过表名获取所有字段名和类型;
        select column_name,data_type from information_schema.columns where table_name = '表名'

相关文章:

  • 2021-07-25
  • 2021-10-02
  • 2021-09-24
  • 2022-01-24
  • 2021-11-22
  • 2022-02-28
  • 2022-03-09
猜你喜欢
  • 2022-12-23
  • 2021-08-18
  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案