Hi All,
I am trying to do an SQL query for records containing a certain character, say, c , in 'field'
I think if the character c is at the beginning, we use :
Select ... from table
where field like 'c % ' , where % is a wildcard.
Similar for cases where the character is at the end, i.e., we...
Hi all,
This is for SQL queries, sorry ran out of space in the title.
Say we are doing a query that includes a null field/attribute. Must we always use either an " Is null" or
" Is not null" statement?
Thanks.
Hi all,
I want to do some Access SQL queries on some data. Do I need to have the data in some special format/extension to be able to "use it" , meaning do queries on it within Access SQL?
Thanks
I am a computer programmer, mostly in Windows, but a little bit into open source, Linux and Java. I work a lot in javascript and SQL of one kind or another, both of which are utilized somehow via all common platforms.
I am also interested in music, physics, and chemistry. I play piano and...
Does anyone know how to change names in an SQL view (i.e., a sort of a subset of a database. We may create it by saving a query and then doing a query on this saved query )?
Thanks.
Hi a probably dumb question on Referential Integrity:
I think I understand the basic idea/motivation for it, but one thing I am confused about is this: just when/how
do we declare a column in a given table T' to be a foreign key related to the primary key for table T? Is it when we...
Hi all,
Say we have a collection T_1, T_2,..., T_n of tables. I would like for any pair to be related. Would it
work if I where to select any field, say the primary key PKT_1 for T_1 and insert it (albeit artificially) meaning
include it as an attribute in every other table? If we did this...
Hi, say I am doing a query for which I need data from two tables,
on, say the salary of those who teach French from 2-to-3 P.M, and one table T_1
contains the teaching subject and another table T_2 contains the class schedule/hours.
Say these two tables are related.
Do we then do a query...
Hi All, I know that if we use Select * , then the fields in the table will appear in the same order as listed. Same if we list all the fields manually, as in Select field1, field2,.., fieldn . Is it true that the order of the fields is preserved always (I can't think of other cases at this...
Hi, just curious about the difference between the " Sort By " and " Order By" commands in database. I assume Sort by is used in QBE and "Order by" is used in SQL ? While we're at it, how about "Group By"?
Thanks.
I am doing a ER Diagram for a class and having a lot of trouble with a specific piece of the sentence. Anyway, here is the business requirements we are diagramming:
The video rental company has several branches throughout the USA. The data held on each branch is the branch address made up of...
I'm having a hard time understanding how nested loops work in SQL.
Find all the people who likes all the hobbies.
select p.name
from person p
where not exists (select *
from (select distinct h.hobby
from hobby h) as h1
where not exists (select *...
Hello,
I have written the below queries, can somebody tell me if they are correct. manager_id in Employee Table - supervisor ; manager_id in departments table - manager.
names and department names of managers who do not supervise any employee.
select e.first_name|| ' ' ||e.last_name...
Hi I am trying to create the tables below and having problems with the timeLog table referencing allocation, when I put it into the modified form of Oricle my University uses it dosent like me refrencing the refrenced values it spits out the error:
ORA-02256: number of referencing columns must...
Iam currently coding a database system for a school here, currently this is my database in MYSQL
I want to know what SQL code to use to count how many students has enrolled in every subjects in the subjects table
the new relation would appear as...
Hallo all,
I need a very conceptual and clear cut definition on sql attacks...there are so many forms of definition and material available on internet that I am just so confused...what the most reliable and authentic source to grasp this info.
Thanks
I've got 3 tables:
Pics - table of my pictures
Categories - table of categories that pictures will fall into
PicsCategories - a many-to-many table relating pictures to categories. So the primary key of this table consists of a pic field and a category field
So now I want to provide a...
I just have a general question that I came up with while doing homework for my database class. I was asked to write a specific query, and when I checked my answer against the posted solutions, it was different. I don't know that much SQL (yet), but I'm pretty sure that my query would produce the...
I'm trying to learn SQL, specifically for SQL server. One question I have is about defining relationships. I know how to build a relationship graphically (showing that the primary key from one table is the foreign key of another), but I'm not sure how to assert the relationship with an...
Hi all,
Trying to write an SQL query for the Sloan Digital Sky Survey that uses the NOT operator, and failing miserably.
Basically, I'm making photometric cuts in 4-d colour space, and I currently have a selection of inequalities that select enclosed regions of colour space.
However, I...
I get a list from a query. Let's say "SELECT name FROM foods WHERE type='fruit';" returns "apple, orange, banana"
I get a list from another query, "SELECT name FROM concepts WHERE type='color';" returns "red, orange, yellow"
Now what I want is to find the common element(s) in the two...
Goal: I seek to log the SQL statements into a MySQL table, with the time they were executed as an aid to debugging problems with PHP apps I am writing.
Problem: MySQL seems to try to interpret the statement, meant to simply be data in a field. When I try to "INSERT" the values, I get MySQL...
I'm having trouble getting the following work. Can anyone help me?
I have two tables that look like the following:
Table 1 Table 2
A B A B C
1 4 1 4 6
2 5
3 6
How do I join both of them such...
Let's say I'm communicating with a SQL (local) database using sqlite. How would i go about displaying this database as a table in a win32 program using either dev-c++ or MSVS++?
I want to learn about networking and SQL,
where should i start? what books are good for this ?
I want to learn the hardware and software knowledge on netwroking.
Please suggest to me, thanks.