I am studying SQL Language and am having some problems in creating tables, I can not set a default value in a column, whenever I apply it indicates a syntax error. Can someone help me? I have no idea what is happening ... (If there are more erro...
I have a history of conversations that are registered in the table sql "conversation" and I want to pick who was the last person who inserted a message in the conversation to know if it was the user who wrote last or if it was the admin (id 28)...
I have a movement table that has the worker's record and the events related to it,
I wanted a query that would return only the records that have exactly the events e1, e2 and e3, in case of the example above the records would be 001 and...
I have a sales table and would like to select customer sales, but if the customer made more than one sale per month, I would like it to bring the older one just, how could I do that?
I do not have SQL code to provide because I do not know whe...
I have a column where the strings are in the following format: " 12.05% "
I need to do some calculations with these values, and I'm formatting the values that are acceptable for float / double format etc.
I have the following line in my qu...
I created the following table in sql
CREATE TABLE vendas
(
ID INTEGER IDENTITY(1,1),
Empresa VARCHAR (20),
Modelo TEXT,
Preco REAL,
Kilometragem REAL,
Ano INTEGER,
PRIMARY KEY(ID)
);
I p...
I have the following table in the database:
idUser - Username - Group
1 - John - 5GR
2 - Doe - 1GR
And the following query:
SELECT * FROM 'table' WHERE 'idUser' = '$name' OR 'Group = '$name'
$ name is the variable that conta...
Is it possible to query ( SELECT ) data returned from a column such as columns ?
select questors from table;
| coluna | → coluna
|-------------|
| dado1 | → dados retornados da consulta
| dado2 |...
I have a database of 300MB and I only have the FRM, MYI and MYD files. I need to convert the FRM files first to create the structure of the tables, I have already used the following tools and methods and I did not succeed:
link
Error: ER...
How do I apply a function in SQL ORACLE that just brings me records from the current month?
Note: I have a date column in date format (eg 13/13/18).
In the sql server I applied the function below and worked perfectly:
DAT_REFERENCIA>= DA...