标签:where http form data sele HERE efault mys user
1、Sql
SELECT column_name as FName,data_type as FType,CHARACTER_MAXIMUM_LENGTH as FLen from information_schema.columns where table_name=‘" + Table + "‘";
SELECT b.name, a.name FName from sysobjects b join syscolumns a on b.id = a.cdefault where a.id = object_id(‘" + Table + "‘) ";
2、Oracle
SELECT DATA_LENGTH AS LEN FROM USER_TAB_COLUMNS WHERE UPPER(TABLE_NAME)=‘" + Table.ToUpper() + "‘ AND UPPER(COLUMN_NAME)=‘" + Field.ToUpper() + "‘"
SELECT DATA_TYPE,OWNER FROM ALL_TAB_COLUMNS WHERE upper(TABLE_NAME)=‘" + Table.ToUpper() + "‘ AND UPPER(COLUMN_NAME)=‘" + Field.ToUpper() + "‘"
3、MySql
select character_maximum_length as Len, table_schema as OWNER,DATA_TYPE FROM information_schema.columns WHERE TABLE_SCHEMA=‘" + DBDatabase + "‘ AND table_name =‘" + Table + "‘ and column_Name=‘" + Field + "‘"
标签:where http form data sele HERE efault mys user
原文地址:https://www.cnblogs.com/z5337/p/10928009.html