Questions tagged as 'sql'

2
answers

What is a "0" field in SQL SELECT?

I did not understand the use of 0 in this code: SELECT substring ... 0 AS PARCELADO, ... FROM ... What does it do?     
asked by 08.12.2014 / 17:48
3
answers

Change column for indentity using T-SQL in SQL Server

I need to change an existing column in a table so that it has the identity property using T-SQL and then insert data into this table. The column already contains data and after this insertion, I must again change this column by disabling...
asked by 15.12.2015 / 15:35
2
answers

How to do a "rbind" in tables from a SQL base from R?

I would like to "merge" two tables from a SQLite database from the R - and save this into a new table within the same database. Here is a minimum reproducible code: install.packages("sqldf",dependencies=T) install.packages("RSQLite",de...
asked by 18.09.2014 / 02:27
2
answers

How to remove formatting from the GETDATE () command

I'm developing an application that will be used by multiple clients simultaneously, I'd like to use Day, Month, Year, Hour, Minute, Second and Millisecond as id and / that the : function returns?     
asked by 28.05.2015 / 14:32
1
answer

A product in Various Categories - PHP

Would you like to know how to link a product into several categories? For example: A shirt may be in the "Green / Blue / Yellow" categories and when I filter by category the product should appear in the "Green, Blue or Yellow" category. I kno...
asked by 30.03.2015 / 20:51
2
answers

How to search for two words in the same field Mysql

Good morning. I have a field in my table called tags , I would like to search, where two or three words can be considered. Example: In the tags field, I have some words, like "free", "booths", "audiometer" ... with the query b...
asked by 09.03.2018 / 15:12
1
answer

Concatenate columns in rows

I'm trying to grab multiple columns and turn them into single line, but to no avail. This is the select I'm trying to do: SELECT ('dias2produto'+'dias4produto') as 'Até 4 dias', round(((('dias2produto'+'dias4produto')*100)/'total_produto'),...
asked by 22.08.2018 / 17:12
2
answers

Return 0 when SUM is NULL

When it does not find results it returns NULL , how can I do for the search return me 0 when NULL ? SELECT SUM(coluna1 + coluna2 + coluna3) FROM table WHERE nome='funalo' AND MONTH(data) = 09 AND YEAR(data) = 2018     
asked by 10.08.2018 / 15:27
2
answers

Is it possible to do an INSERT INTO SELECT + other values outside of SELECT?

I need to insert into a table ACCESS some values from another table plus the time and the user who registered. I know that to get the data from the other table just do something like: INSERT INTO TABELA(ID, NOME, ENDERECO) SELECT ID,...
asked by 13.09.2016 / 16:52
1
answer

Maximum size for database tables

What can be the maximum size that a table can have? To be clearer: a table in MySQL, what is the maximum size it supports? And in SQL Server, Oracle, PostgreSQL?     
asked by 07.07.2016 / 20:17