Questions tagged as 'sql'

1
answer

Relationship 0..1 in practice

Having the following tables:    request    address    table    Orders can be made at the pizza shop, ie for a table. It may be a delivery (address) or it may be a travel order where it does not belong to anyone. In the SQL of the reque...
asked by 08.01.2016 / 18:39
2
answers

Replace contents of one table with another?

My case is as follows: I have two tables TAB1 and TAB2 ; the two tables have the same structure: (id, name, nickname). I would like to replace the contents of TAB1 with TAB2 . Everything in TAB2 must be del...
asked by 02.11.2016 / 10:44
2
answers

how to query data in a table that is not related to another table?

I have the following tables: CREATE TABLE IF NOT EXISTS 'categoria' ( 'id' INT NOT NULL AUTO_INCREMENT, 'nome' VARCHAR(25) NOT NULL, 'descricao' VARCHAR(100) NULL, PRIMARY KEY ('id')) ENGINE = InnoDB; CREATE TABLE IF NOT EXISTS 'veicu...
asked by 22.11.2016 / 14:28
1
answer

Is it indifferent to use SQL Server or MySQL with PHP?

I'm setting up a medium project and I'm going to model the database, then create the tables, the procedures , and the database itself, of course. I would create everything with MySQL, but by already messing with SQL Server, I thought I could us...
asked by 22.07.2016 / 19:47
2
answers

Saving file path in MySQL

I'm having difficulty saving file address to the database. When saving the address to the bank it is adding the amount of times I used OpenFileDialog to save a file. Save the address always so C:\Users\phili\Desktop\PDF_SGIM_QUALIDA...
asked by 21.06.2016 / 17:34
1
answer

Presentation of the php query

I need to help me create a function in php that lists multiple tables in a row with multiple columns, depending on the amount of records in the database and the spacing of the tables defined by <div class="span"> This is my role,...
asked by 11.06.2016 / 10:52
2
answers

Count with null value return zero

I made an insert into a table and now I need to make a select in that table by making a count in a given column. The question is that this column (which I gave the request name) has null value for some situations and when I do the count, I wo...
asked by 31.10.2018 / 19:34
2
answers

Doubt in filtering a Query in SQL

How can I filter a Query so that "Customers" with more than one phone does not appear, which in this case would be Carlos as follows the image below. I'm breaking my head and I can not find anywhere on the net this command. From now thank you...
asked by 04.01.2019 / 09:29
1
answer

Difference between INNER JOIN, JOIN and WHERE? [duplicate]

I need to make a query that returns information according to a given condition, I've always used Where because I did not know if I could use another method. So what's the difference between Where , Inner Join and...
asked by 20.10.2017 / 17:40
3
answers

Error using LIKE to search by name

When I used Mysql I could use LIKE ? to do searches by name, code, etc ... Now in SQL Server I can not. I have a TextField and a search button, I want to get the value of the textField and move on to the search. I'm trying to do it thi...
asked by 17.06.2015 / 19:09