Mysql – Constraint SQL on column password
I am a beginner in SQL and I want to do something on my table 'User'. I would like to make a constraint on my 'Password' column. The constraint is "Passwords only can be made of letters and digits, the…
I am a beginner in SQL and I want to do something on my table 'User'. I would like to make a constraint on my 'Password' column. The constraint is "Passwords only can be made of letters and digits, the…
I have a table like below, Name Value A Sample1 A Sample2 A Sample3 B Sample3 B Sample1 C Sample2 C Sample3 D Sample1 If I group the table by Name to get the count, Select Name, Count(*) as count…
So I'm looking to use a custom row cell to label my data. Basketball Baseball Golf Cost 1 0 0 $50 0 1 0 $75 1 0 1 $150 0 1 1 $225 The table I have is above. What…
I am using postgresql. Let's suppose I have this table name my_table: id | idcm | stores | du | au | dtc | ---------------------------------------------------------------------------------- 1 | 20447 | [2, 5] | 2022-11-02 | 2022-11-15 | 2022-11-03 11:12:19.213799+01 | 2…
I have these two tables: Staff (staffNo(PK), fName, lname, gender, DOB, salary, intTelNo) CarPurchase (purchaseNo(PK), registrationNo(FK), customerNo(FK), amount, date, staffNo(FK)). I need an SQL query to list the names of all male staff who have sold more than 10 vehicles.…
In the following case: CREATE TABLE Persons ( groupId int, age int, Person varchar(255) ); insert into Persons (Person, groupId, age) values('Bob' , 1 , 32); insert into Persons (Person, groupId, age) values('Jill' , 1 , 34); insert into Persons…
I have 2 tables in Mysql. I want to regroup and count the Number of Orderid per month for each customer. If there is no order, I would like to add 0. Customer Table CustomerID 1 2 3 Order Table…
dept_id course_id student_id CS 101 11 Math 101 11 CS 101 12 CS 201 22 Math 301 22 EE 102 33 Math 201 33 This is the current sql table called "enrolled" and I need to select all the departments…
Are there other special literal values besides NULL in SQL / PostgresQL? NULL is nice in that we can interpret NULL as the concept of "nothing" (i.e. missing, not available, not asked, not answered, etc.), and data columns of any…
How is it possible to show all orders which are not completely paid off related to a client? for e.g. SHOW ALL order details of ‘unpaid’ ORDERS for CLIENT ‘50’ table: orders id order_total client_id 1 15.00 50 2 18.50…