Skip to content

Instantly share code, notes, and snippets.

{ “_id” : 0 , “name” : “Clairton Carneiro” , “teachers” : [ 0 , 1] }
{ “_id” : 0 , “name” : “Miranda”}
{ “_id” : 1 , “name” : “Amaury Brasil”}
db.students.findOne()
db.students.findOne()
@clairtonluz
clairtonluz / showForeignKeys.sql
Last active August 29, 2015 13:56
showForeignKeys
use INFORMATION_SCHEMA;
select TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME,
REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME from KEY_COLUMN_USAGE where
REFERENCED_TABLE_NAME = 'nomeDaTabelaPai';
$ nslookup www.youtube.com.br
# Fedora
yum install icedtea-web
# Gentoo
emerge -av icedtea-web
--Tabelas de exemplo
create table usuarios(
id int not null primary key auto_increment,
nome varchar(70),
fone varchar(10)
);
create table contatos(
id int not null primary key auto_increment,
<h:outputText value="#{user.data}">
<f:convertDateTime pattern="dd/MM/yyyy"/>
</h:outputText>
<h:outputText value="#{produto.preco}">
<f:convertNumber pattern="#,###,##0.00" />
</h:outputText>