We can run sql query on ordinary columns easily , but what if column name is name of any commands of sql !
Yes , It will put an error if you treat in like a ordinary column , let’s understand it with the help of example , suppose we have table name as “data” –
pk | create |
1 | Tom |
2 | Lucy |
3 | Frank |
4 | Jane |
5 | Robert |
As you can see in above table , we have column whose name is “create” , which is name of a sql command , so if you want to fetch out “create” columns details than you can give command –
SELECT [create] from data;
As you can see in above code , we just added square bracket in column name if column name is the name of any command of sql.
It will give output like –
Tom Lucy Frank Jane Robert
Thank You! for reading.