SQLTeam.com | Weblogs | Forums

Exam samples 2

Good day everyone. Here's 2 question of my exam sample. Pls check.

Select * From Customers
Where Country equals = 'Germany'
And city 'Berlin'

There is wring syntax in the following query. Rewrite it with correct syntax.

My answer=
Select * From Customers
Where country = 'Germany' and City = 'Berlin'

Am i correct. Pls guide. Tq.

probably. but why not try it on a real database?

I don't have one. It is a question from past year papers and my lecturer told us to figure it out. Which is why i need ur help

Then get one! SQL Server express is free. So is SQL Server 2016 Developers Edition. Not to mention free versions of Oracle, DB2, PostgreSQL, etc.

Does it mean i have to create a fake database first in other to verify my syntax?

I would. Really you should just do this. It will help you lots going forward.

Also sqlfiddle.com can do basic syntax analysis.

For that matter, you only have to install SSMS 2016 (google it) to get a local database you can use for simple testing

Rite. Ill try making a fake database and try testing around with the codes there. Any progress i will let u know . tq.