I remember when I was working with PHP several years ago, I could explode my application by calling the MySQL column "desc" or any other term that was used as an operator.
So, in general, are there any names I should avoid using table columns?
As long as you surround each column name with "['and']", it really doesn't matter what you use. Even space works (try: []).
: '[' ']' , , , ; . ( SqlServer) : a-z, A-Z, 0-9, _, $, #.
, , -
, , ,
create table 1abc (id int)
create table [1abc] (id int)
[] , , .
, .
"" . , ( MSSQL)
(, , ), T_PERSON, V_PERSON, C_NAME .. , .
T_PERSON, V_PERSON, C_NAME
SQL (, SELECT), .
.
[square brackets] "double quotes", , , .
[square brackets]
"double quotes"
, . , , SQL , .
, :
SELECT [value], [select], [insert] FROM SomeTable
, , , , , "", !: -)
SQL , , , .
[] , .
MS SQL Server 2008
UPDATE SET = 1 WHERE [id] IN (SELECT [id] FROM ids)
, , :
UPDATE SET = 1 WHERE id IN (SELECT [id] FROM ids)
, , ( ):
SELECT * FROM logs WHERE [id] IN (SELECT [id] FROM ids)
MSDE 2000 SP3 MS SQL (2000) Query Analyzer V 8.00.194
, , http://support.microsoft.com/kb/140215
Source: https://habr.com/ru/post/1712018/More articles:Как сделать этот код более компактным и читаемым? - coding-styleStrange things when outputting XHTML using SimpleXML - phpConnect an ASP.NET application to QuickBooks Online Edition - asp.netHow to update the maximum cycle length if the body length is shorter? - arraysДействительный XML для публикации в QuickBooks Online Edition - Получение (400) Ошибка запроса - c#How can I compare two series of data in QTP - testingMailing List Management API? - apiExcel VBA - Use Module in Book B to Update Data in Book A - vbaIntegrated graphical and graphical solutions ...? - ruby-on-railsHow to check if the server supports xmpp protocol? - dnsAll Articles