How can I create select to show only the employees of a company that have been admitted to it before a given year?
The type yearAdmission is date ie: dd-mm-AA
I have a trigger that after inserting a new user in the table tFuncionario I have to fill another table tPlanoSaude with the data of the official.
Employee table
HealthPlantable TriggersCodeCREATEORREPLACETRIGGERINSERTFUNCIONARIOBEFOREINS...
At the time of executing the error query stating that it is not possible to create the foreign keys, I looked in the documentation and did not understand whether this code is possible or not.
create table autor(
cod_autor integer,
nome...
Given the following hypothetical schema:
create table cidade(
cidade_id integer primary key not null,
nome varchar(40)
);
create table envios(
id integer primary key not null,
cidade_origem_id integer,
cidade_destino_id intege...
I have a table with approximately 7 thousand records, I need to create a new column in this table but I would like all the old records to have the value 'S', when I try to create the column the fields get null value, passing as default ' S'. How...
I'm doing a sign-up screen, but I wanted the system to already display the ID (id_entity) that will be registered.
When saving, it will ask if I want to register documents, then if I click on yes, it goes to a new doc registration form that when...
I have the following problem:
I'm running a Procedure in Sql Sever that generates an XML to me via the XML PATH command, however, one of the fields is an array, what I got was this:
This select is inside the PROC which is what matters to...
I would like to display in the table the information of the registered student and also of the courses that he is enrolled in.
Final result you'd like displayed:
Nome Aluno | Telefone Aluno | Cursos
---------------------------------------...
How do I order by by text criteria?
I have a column with some classifications and I wanted it to come in the order I determine.
Example:
'carro1'
'carro3'
'carro5'
'carro10'
'carro2'