0 votes
1 view
in SQL by (20.3k points)

One of my columns is called from. I can't change the name because I didn't make it. Am I allowed to do something like SELECT from FROM TableName or is there a special syntax to avoid the SQL Server being confused?

1 Answer

0 votes
by (40.4k points)

You can try wrapping the column name in brackets so that from becomes [from] like this:

select [from] from table;

When you are querying multiple tables, then you can use the following query:

select table.[from] from table;

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...