所以创建View的时候系统存储的是当时字段的字段类型,即使后来字段类型更改SQL Server也不会自动更新View,需要手动更新。所以大
今天有个供应商问我一个问题如果更改表中一个字段的数据类型是不是View中的字段类型也响应自动更改。当时我想应该是会自动更改的。
但是供应商说他们试过了不会更改的,问我除了重新建有没有什么办法。当时想到了刷新View的存储过程sp_refreshview,让他们试一下。执行之后View中的数据类型就被更新了。
通过这个例子可以看到View中的字段类型是不会同步的除是schema-bound 的View. MSDN查到的解释:
Updates the metadata for the specified non-schema-bound view. Persistent metadata for a view can become outdated because of changes to the underlying objects upon which the view depends.
所以创建View的时候系统存储的是当时字段的字段类型,,即使后来字段类型更改SQL Server也不会自动更新View,需要手动更新。所以大家创建View的时候最好不要用select *. 另外可以用SchemaBinding选型对表进行限制。

Tadropaviewinmysql, utilisez "dropVieVieFexistView_name;" andtomodifyAview, utilisez "CreateOrrePlaceViewView_NameasSelect ...". WHENDROPPINGAVIEW, Considérez les dépenses et utilise "showCreateViewView_name;

MysqlViewScaneffectivelyulizeSesIgnPatternslikEadapter, décorateur, usine, andobserver.1) adapterpatternadaptsdatafromdifferentTablesIntoaunifiedView.

VuesInmysqLareBeneficialForsImpliftifiedComplexQueries, améliingSecUrit, assurant la dataconsistence et optimisation

ToCreateasImpleViewInMysQl, usethCreatEViewstatement.1) définietheViewwithCreateEViewView_Nameas.2)

ToCreateUsersinmysql, usethcreateuserstatement.1) ForalocalUser: CreateUser'LocAlUser '@' localhost'identifiedby'securepassword '; 2) forareMoteUser: CreateUser'RemoteUser' @ '%' identifiéBy'strongPassword '; 3)

MySQLViewShavelimitations: 1) Theydon'tsupportalLSQLOPERations, restreignantDatamanipulation à travers la vue

La bonne gestion de la gestion de la direction

MySQLDOES NONTIMPOSEAHARDLIMITORSTRIGRERS, BUTPRATICALFACTORSEDERTERMINETHEIREFFECTYUSE: 1) ServerConfiguration ImpactStriggerManagement; 2) ComplexTriggersInCreasgeSystemload; 3) LargerTableSlowtriggerPerformance; 4) HighCunCurrencyCanCauseTr fichestring; 5) M) M


Outils d'IA chauds

Undresser.AI Undress
Application basée sur l'IA pour créer des photos de nu réalistes

AI Clothes Remover
Outil d'IA en ligne pour supprimer les vêtements des photos.

Undress AI Tool
Images de déshabillage gratuites

Clothoff.io
Dissolvant de vêtements AI

Video Face Swap
Échangez les visages dans n'importe quelle vidéo sans effort grâce à notre outil d'échange de visage AI entièrement gratuit !

Article chaud

Outils chauds

Version Mac de WebStorm
Outils de développement JavaScript utiles

SublimeText3 Linux nouvelle version
Dernière version de SublimeText3 Linux

MinGW - GNU minimaliste pour Windows
Ce projet est en cours de migration vers osdn.net/projects/mingw, vous pouvez continuer à nous suivre là-bas. MinGW : un port Windows natif de GNU Compiler Collection (GCC), des bibliothèques d'importation et des fichiers d'en-tête librement distribuables pour la création d'applications Windows natives ; inclut des extensions du runtime MSVC pour prendre en charge la fonctionnalité C99. Tous les logiciels MinGW peuvent fonctionner sur les plates-formes Windows 64 bits.

SublimeText3 version chinoise
Version chinoise, très simple à utiliser

SublimeText3 version Mac
Logiciel d'édition de code au niveau de Dieu (SublimeText3)
