Query for gathering info from 3 tables with condition depended on 4th table

Ads

 
 

Share on Google+Share on Google+

Amit Manikraj Deshmukh
Query for gathering info from 3 tables with condition depended on 4th table
0 Answer(s)      6 years and 11 months ago
Posted in : SQL

I have 4 tables, 1 User profile (PK usrid), 2 Friend list(pk ugid), 3 user updates(PK updatesguid), 4 comments on updates(PK comment guid) i want a query in which I will get a data of people, there updates, and comments on updates who are friend of current user.(tables are InnoDB and have FK)

Ads
View Answers
Ads









Related Tutorials/Questions & Answers:
Query for gathering info from 3 tables with condition depended on 4th table
Query for gathering info from 3 tables with condition depended on 4th table  I have 4 tables, 1 User profile (PK usrid), 2 Friend list(pk ugid), 3... a query in which I will get a data of people, there updates, and comments on updates
sql query to get data from two tables
sql query to get data from two tables  how can i get the data from two different tables?   Hi Friend, Please visit the following link: JOIN Query Simple Query Thanks
Advertisements
sql query to get name,age,phone,address from tables t1,t2,t3,t4,t5 ..
sql query to get name,age,phone,address from tables t1,t2,t3,t4,t5 ..   this is for single table : query ="SELECT name , age , pwd , phone , address FROM t1 order by name"; this is for 2 tables : query ="SELECT t.name
Write a query to delete a record from a table
Write a query to delete a record from a table  Write a query to delete a record from a table   Hi, The query string for the delete operation is as follows- delete from employee where id='35'; Thanks
Mysql Join 3 Tables
an example from 'Mysql Join 3 Tables' using Left Join. To grasp this example...) Query to join data of  above 3 Tables created above:- The below Query... Mysql Join 3 Tables      
Mysql List Tables
;  The Tutorial illustrate an example from 'Mysql  List Tables'. To understand this example we use show tables query that return the list of tables in database name 'Table_in_girish'. The Syntax used to display the list
fetch record from MYsql table query
fetch record from MYsql table query  Hi. I have a field in database named stages. its datatype is varchar(60). It contains values chennai,trichy,kanchipuram for a single record. I have to retrieve these data from the field table
How to display all the Select values from the MySQL database table in where condition= In JSP?
How to display all the Select values from the MySQL database table in where condition= In JSP?  **Hi in jsp,SQL select statement,i am unable... in the jsp file. @select * from table dept where dept_no=10;" jsp code i have used
MySQL PHP Query delete
( ) delete query from a database table. MySQL PHP Query is used to delete the records from the table 'MyTable' based on condition specified in Where Clause. ... (0.00 sec)` Query to view data inserted in table: mysql> select * from mytable
query regarding exporting table from jsp page to pdf
query regarding exporting table from jsp page to pdf  hello i am displaying one table on my jsp page and i want to save that table in pdf file can u...; <table border="1"> <tr><td>Name</td><
query regarding exporting table from jsp page to pdf
query regarding exporting table from jsp page to pdf  hello i am displaying one table on my jsp page and i want to save that table in pdf file can u...; <table border="1"> <tr><td>Name</td><
query regarding exporting table from jsp page to pdf
query regarding exporting table from jsp page to pdf  hello i am displaying one table on my jsp page and i want to save that table in pdf file can u...; <table border="1"> <tr><td>Name</td><
query regarding exporting table from jsp page to pdf
query regarding exporting table from jsp page to pdf  hello i am displaying one table on my jsp page and i want to save that table in pdf file can u...; <table border="1"> <tr><td>Name</td><
query regarding exporting table from jsp page to pdf
query regarding exporting table from jsp page to pdf  hello i am displaying one table on my jsp page and i want to save that table in pdf file can u...; <table border="1"> <tr><td>Name</td><
query regarding exporting table from jsp page to pdf
query regarding exporting table from jsp page to pdf  hello i am displaying one table on my jsp page and i want to save that table in pdf file can u...; <table border="1"> <tr><td>Name</td><
query regarding exporting table from jsp page to pdf
query regarding exporting table from jsp page to pdf  hello i am displaying one table on my jsp page and i want to save that table in pdf file can u...; <table border="1"> <tr><td>Name</td><
query regarding exporting table from jsp page to pdf
query regarding exporting table from jsp page to pdf  hello i am displaying one table on my jsp page and i want to save that table in pdf file can u...; <table border="1"> <tr><td>Name</td><
get info from mysql using jsp and servlet
get info from mysql using jsp and servlet  HELLO! I wanna create a jsp page which able to let me get its name, phone and other info by asking...(); ResultSet rs = st.executeQuery(query); out.println("<table border='1'> while
retrieving info from DB using struts?
retrieving info from DB using struts?  Hi. I was looking info about retrieving info from a database using struts. I need a .java that I suppose connects to a database and show the info on a jsp. Somebody could help me
Purge Data from Mysql tables
to purge data from tables. but written procedure clear entire tables data...,reservationid FROM movedata_table; DECLARE CONTINUE HANDLER FOR NOT FOUND SET... THEN LEAVE read_loop; END IF; DELETE FROM attendance_table WHERE
Java Query divide frame into 3 rows and 3 columns
Java Query divide frame into 3 rows and 3 columns  how can we divide the frame into 3 rows and 3 columns
Java to extract info from .iCalendar files
Java to extract info from .iCalendar files  I need to write a java program that will extract information (events) from .ics files, such as those used... for each subcategory I need to extract from the file and creating an individual
Data fetch from multiple SQL tables - Hibernate
that would use table classes to retrieve data from 8 or 9 tables. Any example of HQL fetching data from multiple tables would be a help. I have tried... my first hibernate application. I have a sql query that fetches data from
select result from three tables using sql.
select result from three tables using sql.  I want to get a result from three tables. i dont how to write the sql query. Please help me. "I want to display Name,Username and Product_Name where Id=007" table "register" Name
mysql select from multiple tables
mysql select from multiple tables   how can i select the date field from multiple tables in mysql?   "UNION" can be used to select data from multiple tables in my sql... for example (SELECT * from name where `name
Mysql List Tables
; The Tutorial illustrate an example from 'Mysql  List Tables'. To understand this example we use show tables query that return the list of tables in database name 'Table_in_girish'. The Syntax used to display the list
Sql query from oracle
Sql query from oracle  Please help me that I want to get the table names form the existing database who does it having eid coloumn plz provide me query in oracle database
dojo grid from 3 different sources
dojo grid from 3 different sources  I'm new with dojo. I need to get data from 3 different database tables and diplay them on the browser (maybe..., ... from table #1 I need to get all the fields. Then to get from table #3 (based
query to fetch the highest record in a table
query to fetch the highest record in a table  Write a query to fetch the highest record in a table, based on a record, say salary field in the empsalary table
Retrieving Tables from a Database
Retrieving Tables from a Database   ... for retrieving tables from a specific database through an example. In relational... the tables. To work with this, it is very important to know how to retrieve
Mysql From Table
Mysql From Table       Mysql From Table is used to specify the table from which the records...(5,'Santosh'); Insert Into Stu values(3,'Komal'); Query

Ads

 
Advertisement null

Ads