SQLTeam.com | Weblogs | Forums

Exam samples 2


#1

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'
6m

Am i correct. Pls guide. Tq.


#2

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


#3

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


#4

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.


#5

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


#6

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


#7

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