Skip to content

Tag: mysql

Left Join return not all row

I have two tables: baseresulttables and historyviewdemands. I want to get the first n entries from baseresulttables, and if there are values for them in historyviewdemands. But the query works like an inner join. What am I doing wrong? baseresulttables historyviewdemands Query: reuslt Answer Using LIMIT witho…

how to get single result in using 2 table data

i have to table 2 in same structure .i already get the result by using one table using following query this query will time devide in to the 2 part(time in and time out) .it work fine.now want to get the data from anther table also.it also have same structure attendancedata table. attendancedata table structu…

i can’t Merge two tables

i have one tables attendance main table i created 2 views from attendance table attend view and leaved view view:attend view:leaved after that i used this code to merge attend and leaved view the result was like this result i need each employee has attend time and leaved time in same day Answer This following…

Query table using multiple foreign keys

So I’m just messing around with a NodeJS application, and I’m trying to implement a permission system using my database. It’s my first time working with any kind of SQL environment, so please correct me if I’m doing something terribly wrong. I have the following tables: So there are 2 …