Welcome To Snipplr


Everyone's Recent SQL Snippets Tagged table



« Prev 1 Next »
clone table with structure and indexes
0 759 posted 8 years ago by ktrout
Confirm the sql script file is encoded with `UTF-8`
0 779 posted 9 years ago by jacktan
Example of SQL syntax to add a new column to an existing table, define a default value to the columns for the existing rows and also add a check constraint to limit the values that the column can hold.
0 855 posted 11 years ago by denakitan
The inner join could be nested too
0 730 posted 12 years ago by preasha
My Drop Column.sql This template drops a columns of the table.
0 467 posted 13 years ago by edwinet
My Add Column Varchar.sql This template adds a new varchar column to the table.
0 540 posted 13 years ago by edwinet
Get table schema with columns via sql.
0 532 posted 13 years ago by djmornyc
Backup a single table from a database
0 577 posted 13 years ago by tribal
Verify whether temporary table created is exists or not
1 560 posted 13 years ago by hairajeshk
1 448 posted 13 years ago by RealRover
1 586 posted 14 years ago by CDIDevs
A Temp table is great for combining multiple SELECT statements in a Sproc and outputting as just one table. Don't forget to Drop the table after the SELECT * FROM #TempTableName at the end.
2 909 posted 14 years ago by highlyevolved
This will return a list of all the tables in a certain database along with their row count.
1 700 posted 14 years ago by blackf0rk
0 570 posted 15 years ago by smoover
Fields are tab delimited and need to match table schema. I've found the tab separator ASCII(009) preferable over using a comma. The second version can help remove double quotation marks around character fields. Don't forget the keyword LOC...
0 813 posted 15 years ago by RICHARDP
This will create and then populate a MySQL table with a list of the names and USPS abbreviations for US states and possessions in existence.
3 2587 posted 15 years ago by cbrant
This will create and then populate a MySQL table with a list of the names and ISO 3166 codes for countries in existence.
5 1325 posted 15 years ago by cbrant
« Prev 1 Next »