Skip to content

How can i check that a user is 12 and over sql

How do I check that when a user enters their date of birth into my database that they are 12 and over? I am using SQL plus. Right now I have somthing like this: create table test(dateofbirth date …

Accessing PostgreSQL Fields via Indexing

Is there a way in PostgreSQL to access fields without explicitly providing the column name? For example, instead of the statement: there’s a (possible) alternative of: Answer There is no such syntax in Postgres’ SQL. You could always resort to having code that dynamically constructs the query for …

sql table comparisons – postgres

I have two tables with some columns being the same: TABLE A TABLE B I’d like to return the following: How do I check what rows from table B are in table A and also return Col4 (from table B) where they match in the query. I was using EXCEPT which worked great but now I need to have the