Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
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.7k 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;

Browse Categories

...