SELECTTable name= Case whenA.colorder=1 ThenD.nameElse "' End, table describes= Case whenA.colorder=1 Then IsNull(F.value,"')Else "' End, Field ordinal=a.colorder, field name=a.name, Logo= Case when ColumnProperty(A.id,a.name,'isidentity')=1 Then '√'Else "' End, PRIMARY key= Case when exists(SELECT 1 fromsysobjectswhereXtype='PK' andParent_obj=a.ID andNameinch ( SELECTName fromsysindexesWHEREIndidinch(SELECTIndid fromSysindexkeysWHEREId=a.ID andColid=A.colid))) T
SQL script:SELECTTableName= Case whenA.colorder=1 ThenD.nameElse "' End,---table nameTableshowsthat= Case whenA.colorder=1 Then IsNull(F.value,"')Else "' End,---Table DescriptionTheserialnumberfield=A.colorder,---Field ordinalFieldName=A.name,---field nameIdentification= Case when ColumnProperty(A.id,a.name,'isidentity')=1 Then '√'Else "' End, PrimaryKey= Case when exists(SELECT 1 fromsysobjectswhereXtype='PK' andNameinch (SELECTName fromsysinde
Tags: color objects type select Val Table name Export Data desc ObjectSELECT(case if A.colorder=1 then d.name Else ' end) Table name,A.colorder Field Ordinal,A.name Field Name,B.name field type,b.length field Length,G.[value] As Field descriptionFrom syscolumns a LEFT join systypes bOn A.xtype=b.xusertypeINNER JOIN sysobjects DOn a.id=d.id and d.xtype= ' U ' and d.nameLeft Join Sys.extended_properties GOn a.id=g.major_id and a.colid = g.minor_id--where D.[name] --where D.[name] = ' cityhot '-the
Label: Reprint Original AddressHttp://www.cnblogs.com/Fooo/archive/2009/08/27/1554769.htmlSELECT (case if A.colorder=1 then d.name Else ' end) Table name, A.colorder field ordinal, a.name field name, when Colum Nproperty (a.id,a.name, ' isidentity ') =1 then ' √ ' Else ' "End", (case when (SELECT count (*) from SYSO
Bjects WHERE (name in (SELECT name from sysindexes WHERE (id = a.id) and (Indid in (SELECT indid F ROM Sysindexkeys WHERE (id = a.id) and (Colid in (S
Rails Brochure3.8 UsechangeMethod1. Add a field to a tableRails g Migration Add_column_to_d_groups_equip_numclass Addcolumntodgroupsequipnum ] def change add_column:d _groups,: Equip_num,: Integer endend2. modifying table field typesRails g Migration Change_column_to_d_groups_equip_numclass Changecolumntodgroupsequipnum ] def Change change_ Column:d _groups,: Equip_num,: string endend3. Modify the name of the table fieldRails g Migration Change_column_to_d_groups_equip_num_equio_numsc
Tags: def type mod table name har article NET class mustarticle turned from: 79354136MySQL Modify field type:--can modify field type, type length, default value, comment--make a change to a fieldALTER TABLETable name MODIFYCOLUMNField name new data type new type length new default value new comment;--column can be omittedAlter TableTable1 ModifycolumnColumn1decimal(Ten,1)DEFAULT NULLCOMMENT'Notes';--Normal, can modify field type, type length, default value, commentmysql Modify field name:ALTER
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.