Jump to content
xisto Community
Sign in to follow this  
fabiocardoso

Need Help On SQL Syntax

Recommended Posts

What you have shown

SELECT * FROM Customer WHERE Birth = ' 01/01/1982 '

is a perfectly valid SQL query that tells the server to retrieve all people from the customer table whose birthday was on 01/01/1982, if there were none that met that criteria then the response would be blank or null becuse no record was found that met the criteria, just for the fun of it to make sure your syntax is right do this

SELECT * FROM Customer WHERE Birth = '*'


and it will return all customers just as if you did a

SELECT * FROM Customer
then you could also do this for age verification of those at least 22 years old by

SELECT * FROM Customer WHERE Birth >= ' 01/01/1982 '

Share this post


Link to post
Share on other sites

And also, look what is your database, by simply writingselect Birth from customer ;this will tell you all the birth dates in your database, and you will see whether you had blanks, or wich format your customers used.this is not very different from "select * from customer", but will give you only the Birth column, this should be nicer for diagnostics.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.