Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding [] brackets around field names in SELECT statemen
Message
De
03/12/2012 13:48:12
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01558598
Message ID:
01558626
Vues:
63
>Why do you need brackets around the fields when working with SQL Server? I think you only need the brackets if the field name is a reserved word in SQL Server.


Yes, you only need them around reserved words. But, have you seen the reserved words list?? It's very long. And its hard to avoid using some of them. So, a safety-net approach is to surround each table name and field name with [ ]. Problem solved.

SQL Server Management Studio takes this approach any time you use the UI to build a query fo you.

It's just a guaranteed way to be safe.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform